I’ve been running farmOS for a while now, with rather random backup routines. This has to change…
I made 2 bash scripts. One for making a user-triggered backup, and one script for automatic backup (with cron) :
Manual backup:
- pgdump from db-container
- file copy from sites volume : …web//sites
Not via docker commands. - And finally a docker commit to make snapshots of the db and www containers.
Database and site files are placed in a backup folder with timestamped subfolders.
For automatic daily backup:
- pgdump from db-container
- file copy from sites volume : …web//sites
- rsync files and database over to a different server
- “Different server” makes incremental backup to external drive with Backrest backup software.
It’s for sure a step up from random backups.
Plan is to run a manual backup before every update.
And also have simple restore if something breaks.
Did I miss some vital parts?