BostonCityCampus / my.boston.co.za

0 stars 0 forks source link

Improve current backup plan #3

Open lerouxh opened 9 years ago

lerouxh commented 9 years ago

Currently we have the following plan in place on the server: 1) backup and zip mysql dump every day. The previous day is replaced. ~350KB 2) backup and zip myslq dump every Friday. Previous week is not replaced. ~350KB 3) backup and zip moodledata evey day. The previous day is replaced. ~66MB 4) backup and zip my.boston.co.za directory. the previous day is replaced. ~400MB 5) all mysql dumps older than 90 days are automatically deleted.

lerouxh commented 9 years ago

New backup plan: 1) backup and zip mysql dump every day. Only daily backups older than 7 days are removed. 2) unchanged. 3) backup and zip moodledata evey day. Only daily backups older than 7 days are removed. 4) backup and zip my.boston.co.za directory every day. Only daily backups older than 7 days are removed. 5) unchanged 6) backup and zip moodledata ever month. 7) backup and zip my.boston.co.za directory every month. 8) All zip files older than 90 days are removed to reserve disk space. 9) Created directory /var/backup/Archives. Copy zip files here if you don't want them to be removed after 90 days!

Extract of crontab: 20 02 * * * sh BackupSQLdaily.sh >/dev/null 2>&1 30 01 * * * sh BackupMoodleDataDaily.sh >/dev/null 2>&1 40 02 * * 5 sh BackupSQLweekly.sh >/dev/null 2>&1 00 03 1 * * sh BackupMoodleDataMonthly.sh >/dev/null 2>&1 /2 * * * \ php5 /var/www/html/moodle/admin/cli/cron.php

lerouxh commented 9 years ago

Check now if daily/monthly backups in /var/backup/ are automatically removed.