]> andersk Git - sql.git/blobdiff - libexec/cron-weekly-local.sh
DB size and mtime utils
[sql.git] / libexec / cron-weekly-local.sh
index 3857aa4122e85529364c82045b386f9d405fb009..47ff5fd892ac3f22ae80acea0f0ed59688b79502 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
-if [[ `ls /srv/backup/daily/ | wc -l` -ge 3 ]]; then
-       mv /srv/backup/daily/`ls -t /srv/backup/daily/ | tail -n1` /srv/backup/weekly/
+if [[ -s /srv/mysql/master.info ]]; 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
This page took 0.091388 seconds and 4 git commands to generate.