Skip to content

Instantly share code, notes, and snippets.

@rohitjoshixyz
Last active November 26, 2020 10:38
Show Gist options
  • Select an option

  • Save rohitjoshixyz/0f5af5bca6a3063fc26a0bca3efb7d1a to your computer and use it in GitHub Desktop.

Select an option

Save rohitjoshixyz/0f5af5bca6a3063fc26a0bca3efb7d1a to your computer and use it in GitHub Desktop.

To take production dump

mongodump --db simply_smart_production --out dump/simplysmart_23_11_2020

To copy dump from prod server to local machine, run following on local machine terminal

scp -r ubuntu@13.126.244.139:/home/ubuntu/dumps/simplysmart_23_11_2020 /home/rohit/Desktop/dump

To restore the dump on your local machine for development

mongorestore -d 'simplysmart_api_development' '/home/rohit/Desktop/dump/simply_smart_production'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment