X-Git-Url: http://andersk.mit.edu/gitweb/sql.git/blobdiff_plain/fe255fa999b2bf69bae443356dd7775c94831f18..db08841863f9d896f70dcca1547f9b4b46167955:/libexec/cron-weekly-local.sh diff --git a/libexec/cron-weekly-local.sh b/libexec/cron-weekly-local.sh index 47ff5fd..3f86494 100755 --- a/libexec/cron-weekly-local.sh +++ b/libexec/cron-weekly-local.sh @@ -1,7 +1,11 @@ #!/bin/bash -if [[ -s /srv/mysql/master.info ]]; then +/srv/libexec/local_is_backup +BACKUP="$?" +if [[ "$BACKUP" == "0" ]]; then if [[ `ls /srv/backup/daily/ | wc -l` -ge 3 ]]; then mv /srv/backup/daily/`ls -t /srv/backup/daily/ | tail -n1` /srv/backup/weekly/ fi fi + +/srv/libexec/backup-policy.py /srv/backup | sh