|
|
|
|
|
by djsumdog
2307 days ago
|
|
This is awesome. I currently use duplicity for backups to BackBlaze, but my DB backups I just place a files and I've just been pruning old one's manually for a while. Something like this, that lets me specify the file format, would be perfect! |
|
* /var/backup/db/db1/monday.sql
* /var/backup/db/db1/tuesday.sql
* /var/backup/db/db1/monday.sql
For databases that change more frequently I instead backup every 1, 3, 4 hours as appropriate:
* /var/backup/db/db2/monday/00.sql
* /var/backup/db/db2/monday/04.sql
The appeal of this is that I always have "local" backups, and I don't need to consider rotation at all each one gets the most recent copy when it runs, and I have an alert/alarm to make sure files are recent enough that things aren't broken. I appreciate that if your databases dumps are 600Gb each, or something similarly sized you'd waste a lot of space, but for small things the simplicity of this approach is a good win.
(These get copied offsite as part of the backup of the whole filesystem. In the past I used to backup only some stuff, that failed the first time I tried to restore a mailserver and didn't have /var/lib/mailman archived! These days I explicitly backup "/" excluding only /tmp, /proc, /sys, and /dev.)