summaryrefslogtreecommitdiff
path: root/sto-tug-kvm2.swamid.se/overlay/usr/local
diff options
context:
space:
mode:
authorJohan Lundberg <lundberg@nordu.net>2015-04-01 15:00:15 +0200
committerJohan Lundberg <lundberg@nordu.net>2015-04-01 15:00:15 +0200
commit6145765703af9854713b423042556222ec790a3c (patch)
treeeb28d371a572dd4903ef0f52b0de7229e0f7ffe5 /sto-tug-kvm2.swamid.se/overlay/usr/local
parentab5b0450bfc2b66fb1709a8e0f20fd177e65fa2f (diff)
Test for file not dir *smack forehead*sunet-ops-2015-04-01-v13
Diffstat (limited to 'sto-tug-kvm2.swamid.se/overlay/usr/local')
-rwxr-xr-xsto-tug-kvm2.swamid.se/overlay/usr/local/bin/postgres_backup12
1 files changed, 6 insertions, 6 deletions
diff --git a/sto-tug-kvm2.swamid.se/overlay/usr/local/bin/postgres_backup b/sto-tug-kvm2.swamid.se/overlay/usr/local/bin/postgres_backup
index c3d9fb0..94bbe93 100755
--- a/sto-tug-kvm2.swamid.se/overlay/usr/local/bin/postgres_backup
+++ b/sto-tug-kvm2.swamid.se/overlay/usr/local/bin/postgres_backup
@@ -14,12 +14,12 @@ set -e
# keep seven days worth of dumps
rm -rf ${BACKUPROOT}/postgres-dumpall-flogdb.gz.7
-test -d ${BACKUPROOT}/postgres-dumpall-flogdb.gz.6 && mv ${BACKUPROOT}/postgres-dumpall-flogdb.gz.6 ${BACKUPROOT}/postgres-dumpall-flogdb.gz.7
-test -d ${BACKUPROOT}/postgres-dumpall-flogdb.gz.5 && mv ${BACKUPROOT}/postgres-dumpall-flogdb.gz.5 ${BACKUPROOT}/postgres-dumpall-flogdb.gz.6
-test -d ${BACKUPROOT}/postgres-dumpall-flogdb.gz.4 && mv ${BACKUPROOT}/postgres-dumpall-flogdb.gz.4 ${BACKUPROOT}/postgres-dumpall-flogdb.gz.5
-test -d ${BACKUPROOT}/postgres-dumpall-flogdb.gz.3 && mv ${BACKUPROOT}/postgres-dumpall-flogdb.gz.3 ${BACKUPROOT}/postgres-dumpall-flogdb.gz.4
-test -d ${BACKUPROOT}/postgres-dumpall-flogdb.gz.2 && mv ${BACKUPROOT}/postgres-dumpall-flogdb.gz.2 ${BACKUPROOT}/postgres-dumpall-flogdb.gz.3
-test -d ${BACKUPROOT}/postgres-dumpall-flogdb.gz.1 && mv ${BACKUPROOT}/postgres-dumpall-flogdb.gz.1 ${BACKUPROOT}/postgres-dumpall-flogdb.gz.2
+test -f ${BACKUPROOT}/postgres-dumpall-flogdb.gz.6 && mv ${BACKUPROOT}/postgres-dumpall-flogdb.gz.6 ${BACKUPROOT}/postgres-dumpall-flogdb.gz.7
+test -f ${BACKUPROOT}/postgres-dumpall-flogdb.gz.5 && mv ${BACKUPROOT}/postgres-dumpall-flogdb.gz.5 ${BACKUPROOT}/postgres-dumpall-flogdb.gz.6
+test -f ${BACKUPROOT}/postgres-dumpall-flogdb.gz.4 && mv ${BACKUPROOT}/postgres-dumpall-flogdb.gz.4 ${BACKUPROOT}/postgres-dumpall-flogdb.gz.5
+test -f ${BACKUPROOT}/postgres-dumpall-flogdb.gz.3 && mv ${BACKUPROOT}/postgres-dumpall-flogdb.gz.3 ${BACKUPROOT}/postgres-dumpall-flogdb.gz.4
+test -f ${BACKUPROOT}/postgres-dumpall-flogdb.gz.2 && mv ${BACKUPROOT}/postgres-dumpall-flogdb.gz.2 ${BACKUPROOT}/postgres-dumpall-flogdb.gz.3
+test -f ${BACKUPROOT}/postgres-dumpall-flogdb.gz.1 && mv ${BACKUPROOT}/postgres-dumpall-flogdb.gz.1 ${BACKUPROOT}/postgres-dumpall-flogdb.gz.2
echo "Running postgres pg_dumpall..."