Skip to content

Install the server

Run this on a Linux amd64 or arm64 machine with systemd. It detects the public IP address the machine connects from.

curl -fsSL https://litebackup.com/install.sh | sudo bash

Run it as root on the Linux machine that will host your server.

You need a Linux server with systemd that the internet can reach on port 443, and a bucket on S3, R2, Google Cloud Storage, or any S3-compatible store.

1. Install the server

Run the command above on your server, then open the link it prints and give your instance a name. When your instance is ready, it opens in your browser and signs you in.

2. Finish setup

Setup takes a few minutes in the browser: add your bucket, save your recovery kit, and choose how long to keep backups.

3. Back up a database

On the machine that runs your app, install the litebackup command and run it as a service with the join command the setup page shows. Then back up your databases:

sudo litebackup install service --user app --join TOKEN@your-instance.litebackup.cloud
sudo litebackup backup '/var/lib/app/*.sqlite' --prefix app/ --wait server

Every change is backed up from then on. To back up from your app's code instead, use the SDK.

4. Restore and replicate

sudo litebackup versions app/main.sqlite                                  # the versions you can restore
sudo litebackup restore app/main.sqlite --to /tmp/main.sqlite             # restore into a new file
sudo litebackup replicate --prefix app/ --to /var/lib/app/replicas        # live readonly copies

To run the same app on several servers and keep writing when one goes down, see High availability for SQLite.

5. Manage it from your terminal

litebackup admin login signs you in to your instance from any machine, so everything in the console also works from the command line.

Need help? support@litebackup.com