add mongodb backup
parent
7bbe2dcf5f
commit
9d92343fab
|
@ -6,7 +6,7 @@ dbs=($DATABASES)
|
||||||
|
|
||||||
for db in "${dbs[@]}"
|
for db in "${dbs[@]}"
|
||||||
do
|
do
|
||||||
mongodump --host ${HOST} --port ${PORT} --authenticationDatabase admin -u root -p ${PASSWORD} --db $db --gzip --archive=${db}.tgz
|
mongodump --host ${HOST} --port ${PORT} --authenticationDatabase admin -u backup -p ${PASSWORD} --db $db --gzip --archive=${db}.tgz
|
||||||
if (($?==0));then
|
if (($?==0));then
|
||||||
aws s3 cp ${db}.tgz s3://bfs-pkg-storage/mongodb/backup/${datetime}/
|
aws s3 cp ${db}.tgz s3://bfs-pkg-storage/mongodb/backup/${datetime}/
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue