Backups
Automated and manual backup strategies for your LinkBreeze data.
Your LinkBreeze data lives in a single SQLite database plus uploaded images, all inside the linkbreeze-data Docker volume. Back them up regularly.
Built-in backup
LinkBreeze has a built-in export at Admin > Settings > Backup > Export. This downloads your database and uploads as a single archive.
Manual backup (Docker)
# Back up the database
docker compose exec linkbreeze cat /app/data/linkbreeze.db > backup-$(date +%Y%m%d).db
# Back up uploaded images
docker compose exec linkbreeze tar czf - /app/data/uploads > uploads-$(date +%Y%m%d).tar.gz
Automated backup with sidecar
The examples/docker-compose.with-backup.yml file adds a scheduled backup sidecar to your compose stack.
git clone https://github.com/Manak-hash/LinkBreeze.git
cd LinkBreeze/examples
cp docker-compose.with-backup.yml ../docker-compose.override.yml
cd ..
Configure the backup schedule and retention:
environment:
BACKUP_SCHEDULE: "0 3 * * *" # daily at 3am
BACKUP_RETENTION_DAYS: 7 # keep last 7 backups
S3-compatible storage
The sidecar can sync backups to any S3-compatible storage (AWS S3, MinIO, Backblaze B2, Cloudflare R2):
environment:
AWS_ACCESS_KEY_ID: "your-key"
AWS_SECRET_ACCESS_KEY: "your-secret"
AWS_S3_ENDPOINT: "https://s3.amazonaws.com"
AWS_S3_BUCKET: "linkbreeze-backups"
If S3 vars are not set, backups are stored in a local volume only.
Restore
To restore from a database backup:
# Stop LinkBreeze
docker compose stop linkbreeze
# Restore the database
docker compose cp backup-20240101.db linkbreeze:/app/data/linkbreeze.db
# Restart
docker compose start linkbreeze
What to back up
| Path | Contents |
|---|---|
/app/data/linkbreeze.db | All pages, links, themes, analytics, users |
/app/data/uploads/ | Avatars, background images, custom logos |
The database is the critical piece. Uploads can be regenerated but are tedious to replace.