couchdb_dumpall.sh: check if db is in the list of DBs to be excluded
authorvarac <varacanero@zeromail.org>
Thu, 7 Nov 2013 16:23:51 +0000 (16:23 +0000)
committervarac <varacanero@zeromail.org>
Thu, 7 Nov 2013 16:23:51 +0000 (16:23 +0000)
couchdb_dumpall.sh

index e5217e6..074d909 100755 (executable)
@@ -3,6 +3,8 @@
 . couchdb_scripts_defaults.conf
 . couchdb_functions
 
+echo "excluding $EXCLUDE_DBS"
+
 # create backupdir
 [ -d $DUMPDIR ] || mkdir $DUMPDIR
 
@@ -10,5 +12,6 @@ dbs="`get_dbs $URL`"
 
 for db in $dbs
 do
-  dump_db_to_file ${URL} $db 
+  # check if db is in the list of DBs to be excluded
+  [[ " $EXCLUDE_DBS " == *\ $db\ * ]] || dump_db_to_file ${URL} $db 
 done