1
2
3
4
5
6
7ssh -i ~/your-key/im-dev.pem ubuntu@dev-db
mongodump -d IMBackend_staging -o ~/alincode_db_backup
tar -cvf db-170829.tar alincode_db_backup/IMBackend_staging/
rm -rf ~/alincode_db_backup
scp -i ~/your-key/im-dev.pem ubuntu@dev-db:/home/ubuntu/db-170829.tar .
tar xvf db-170829.tar
mongorestore -d IMBackend_development --drop ~/alincode_db_backup/IMBackend_staging