Skip to content

Run your server and keep your keys

Your server holds the bucket credentials and the encryption keys, so app machines only ever need a join token.

How your server works

  • Your bucket

    Connect Amazon S3, Cloudflare R2, Google Cloud Storage, or another S3-compatible store such as DigitalOcean Spaces, Backblaze B2, or MinIO. Litebackup tests reading, writing, listing, and deleting before it enables a bucket, and for S3 the console gives you an access policy that matches it. Use a dedicated bucket or prefix for each server.

  • Encryption

    Your server encrypts every object before it archives it, with keys that stay on the server. The recovery kit or recovery passphrase you save during setup is what lets a replacement server read those objects, so keep it somewhere other than the server and its bucket.

  • Retention

    Choose how far back you can restore, and the console estimates the space that takes on your server's disk and in your bucket before you save. Litebackup removes what retention no longer needs by itself, so avoid bucket lifecycle rules that delete its objects.

  • Server disk and bucket

    Each change reaches your server's disk within seconds and your bucket after the archive delay, 15 minutes by default, which batches many changes into fewer archives. A wait for the bucket includes that delay, so give scheduled jobs a deadline that allows for it.

  • Networking

    Machines reach your server over HTTPS on TCP 443, and the server manages its own certificate. Behind a load balancer or NAT, forward TCP 443 with TLS passthrough and give the installer the public address with --address.

  • Recovering a lost server

    With your bucket and the recovery kit or passphrase, litebackup server recover rebuilds a replacement server from the versions in your bucket. Stop the old server for good first, recover into an empty data directory, and create API keys again afterwards, because they are not kept in the bucket.

  • Administering from anywhere

    The console covers databases, machines, buckets, retention, disk, and users. litebackup admin login signs the command line in to the same instance, and litebackup admin --help lists everything it can change.

  • Updates

    Update your server from its instance page first, then each machine with litebackup install cli, run as the user that installed it. Keep the npm package and the litebackup command on the same version.

The Add a bucket screen with provider tiles and the fields for Cloudflare R2 The Add a bucket screen with provider tiles and the fields for Cloudflare R2

Works with the bucket you already use

Litebackup checks each bucket before it trusts it, and any store that passes its test works.

Choose how long to keep backups

The retention screen shows which versions you keep and estimates the space they need on your server and in your bucket before you save.

The retention screen with a timeline of kept versions and an estimate of disk and bucket space The retention screen with a timeline of kept versions and an estimate of disk and bucket space

Recover your server, run the client as a service, or build an image

Recovery runs on the replacement server, while the service and Docker examples run on the machines with your databases.

# Recover the Litebackup server and its databases from a bucket.
# Run this on the Linux server. The installer requests sudo to install the system service.
# On the replacement server, with the old one stopped for good.
# LITEBACKUP_SECRET_ACCESS_KEY holds the bucket's secret access key.
litebackup server recover \
    --data-directory /var/lib/litebackup-recovered \
    --provider aws \
    --region us-east-1 \
    --bucket YOUR_BUCKET \
    --access-key-id YOUR_ACCESS_KEY_ID \
    --encryption-key-file /secure/recovery/encryption.key

# With a recovery passphrase instead of the kit's key:
#   --passphrase-file /secure/recovery/passphrase
# Add --prefix if the bucket used one, and --endpoint for R2 and other S3-compatible stores.