Backup & Restore

Back up your SQLite database and TOML configuration to any S3-compatible storage provider (AWS S3, MinIO, R2, etc.).

Configuration

[backup]
endpoint = "https://s3.amazonaws.com"
bucket = "my-sendword-backups"
access_key = "${{AWS_ACCESS_KEY_ID}}"
secret_key = "${{AWS_SECRET_ACCESS_KEY}}"
region = "us-east-1"
prefix = "sendword/"

Scheduled backups

Run backups on a cron schedule:

[backup]
schedule = "0 2 * * *"   # Daily at 2am UTC

Retention

Automatically clean up old backups:

[backup.retention]
max_count = 30     # Keep at most 30 backups
max_age = "90d"    # Delete backups older than 90 days

Manual backup

sendword backup create

Creates a VACUUM snapshot of the database, bundles it with the TOML config into a .tar.gz, and uploads to S3.

List backups

sendword backup list

Restore

sendword restore --from sendword/sendword-2024-01-15.tar.gz --output ./restored

Downloads the archive from S3 and extracts the database and config to the target directory.