AutoMySQLBackup fork for SQLite backups
automated daily backup for SQLite databases :
- monthly backup (no cleanup)
- weekly backup (no history)
- daily backup (7 days history)
you can only do a monthly backup if you want, see MDBNAMES option
but if you do, you may need such a backup tool
- sqlite
- mailx (but this is not really mandatory since you won't have any error mail anyway, see below)
- gzip to compress dumps (enabled by default)
- bzip2 or xz to use another compression tool (if enabled)
- copy autosqlitebackup backup script to some location on the server hosting the SQLite database(s) you want to backup, for instance in /usr/local/sbin/
- copy autosqlitebackup.conf file in the folder /etc/autosqlitebackup/ (you may have to create it first) and change it to fit your needs (mainly DBNAMES and MAILADDR ariables)
- copy cron.daily_autosqlitebackup file in the folder /etc/cron.daily/autosqlitebackup (change the backup script location if needed
- pray
Edit /etc/autosqlitebackup/autosqlitebackup.conf to fit your needs
for instance DBNAMES for Daily/Weekly Backup e.g. "fancyname1:/var/lib/myapp/data/database.sqlite fancyname2:/var/lib/myotherapp/myotherapp.sqlite"
absolutely none
this should send you an email when backup fails but since sqlite3 seems to always return 0 and does not generate errors on stderr (even in case of error :p) you probably won't have any