delete /var/backups/couchdb/* before dumping DBs (Bug #4789)
authorvarac <varacanero@zeromail.org>
Wed, 18 Dec 2013 15:27:34 +0000 (15:27 +0000)
committervarac <varacanero@zeromail.org>
Wed, 18 Dec 2013 15:27:34 +0000 (15:27 +0000)
couchdb_dumpall.sh

index 074d909..eca14e9 100755 (executable)
@@ -5,8 +5,9 @@
 
 echo "excluding $EXCLUDE_DBS"
 
-# create backupdir
-[ -d $DUMPDIR ] || mkdir $DUMPDIR
+# remove old content and create fresh backupdir
+[ -d $DUMPDIR ] && rm -rf $DUMPDIR
+mkdir $DUMPDIR
 
 dbs="`get_dbs $URL`"