mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Trying out a slightly different syntax to create shell script loops.
This commit is contained in:
parent
5aeb97ebee
commit
917e67cd77
1 changed files with 7 additions and 7 deletions
|
@ -19,14 +19,14 @@ do_cleanup(){
|
|||
}
|
||||
|
||||
do_backup(){
|
||||
log 'snapshotting the db and creating archive' && \
|
||||
${MONGODB_SHELL} admin fsync_lock.js && \
|
||||
for collection in $COLLECTIONS ; \
|
||||
do \
|
||||
${DUMP_UTILITY} -d ${DB_NAME} -o ${dir_name} -c $collection \
|
||||
done && \
|
||||
log 'snapshotting the db and creating archive'
|
||||
${MONGODB_SHELL} admin fsync_lock.js
|
||||
for collection in $COLLECTIONS
|
||||
do
|
||||
${DUMP_UTILITY} -d ${DB_NAME} -o ${dir_name} -c $collection
|
||||
done
|
||||
tar -jcf $file_name ${dir_name}
|
||||
${MONGODB_SHELL} admin fsync_unlock.js && \
|
||||
${MONGODB_SHELL} admin fsync_unlock.js
|
||||
log 'data backd up and created snapshot'
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue