-
Notifications
You must be signed in to change notification settings - Fork 47
Backup and Recovery
Aaron W Morris edited this page Jun 27, 2023
·
23 revisions
Backup and recovery of indi-allsky involves backing up 4 areas
- Database
- Database migrations
- Flask config
- Images and videos
# Backup
sqlite3 "/var/lib/indi-allsky/indi-allsky.sqlite" .dump | gzip -c > "backup_indi-allsky_$(date +%Y%m%d_%H%M%S).sql.gz"
# Restore
gunzip -c backup_indi-allsky_00000000.sql.gz | sqlite3 /var/lib/indi-allsky/indi-allsky.sqlite
Note: You can backup the binary sqlite database file itself, but it is not portable between platforms (ARM -> Intel)
tar -C /var/lib/indi-allsky/migrations --exclude="*.py[oc]" -cvf - . | gzip -c > "backup_indi-allsky_migrations_$(date +%Y%m%d_%H%M%S).tgz"