Skip to content

Instantly share code, notes, and snippets.

@desaiuditd
Last active October 4, 2016 17:55
Show Gist options
  • Save desaiuditd/53fbfa61d564e2a9d84376e1237fdd36 to your computer and use it in GitHub Desktop.
Save desaiuditd/53fbfa61d564e2a9d84376e1237fdd36 to your computer and use it in GitHub Desktop.
docker run \
--rm \
--link mongodb:mongo \
-v /home/ubuntu/backup-dir:/backup \
mongo \
bash -c ‘mongodump --out /backup --host $MONGO_PORT_27017_TCP_ADDR’
docker run \
--rm \
--link mongodb:mongo \
-v /home/ubuntu/home-app/meteor-mongodb\ backup/dump-2016-08-15:/backup \
mongo \
bash -c 'mongorestore --drop -d home-monterey /backup/home-cta --host $MONGO_PORT_27017_TCP_ADDR'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment