I’m wanting to make sure I have everything I need backed up correctly. On some level, the only real thing I care about is the email itself, and since its in Maildir format - I can restore it to almost any system if need be in the future.
My crons work like this.
- Every 5 minutes, sync vmail offsite.
- Every 5 minutes, sync vmail-index offsite.
- On Sundays, do a full backup of all components.
- On the other 6 days, do a backup of all components except vmail.
5 Every day, send backups offsite.
Any thoughts, feedback, or pitfalls I’m not thinking about?
`# Sync vmail offsite every 5 minutes.
*/5 * * * * /usr/bin/rsync -rlptgoDEW /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/ user@remote.server.com:mx.server.io-mailcow/vmail/
Sync vmail-index every 5 minutes.
*/5 * * * * /usr/bin/rsync -rlptgoDEW /var/lib/docker/volumes/mailcowdockerized_vmail-index-vol-1/ user@remote.server.com:mx.server.io-mailcow/vmail-index/
Full Mailcow backup every Sunday.
0 2 * * 0 cd /opt/mailcow-dockerized/; MAILCOW_BACKUP_LOCATION=/backups/mailcow /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all –delete-days 9
Partial Mailcow backups remaining 6 days.
0 2 * * 1,2,3,4,5,6 cd /opt/mailcow-dockerized/; MAILCOW_BACKUP_LOCATION=/backups/mailcow /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup crypt redis rspamd postfix mysql –delete-days 9
Send Mailcow backups offsite everyday.
0 6 * * * /usr/bin/rsync -rlptgoDEW /backups/mailcow/ user@remote.server.com:mx.server.io-mailcow/mailcow-backups/`