Skip to content

Instantly share code, notes, and snippets.

@clodal
Created November 12, 2018 07:48
Show Gist options
  • Select an option

  • Save clodal/4a4dc52d28cbb7ac2a1c388030537134 to your computer and use it in GitHub Desktop.

Select an option

Save clodal/4a4dc52d28cbb7ac2a1c388030537134 to your computer and use it in GitHub Desktop.
How to backup external mongodb to local mongodb

Backup external mongodb mongodump -h <SHARD_0>,<SHARD_1>,<SHARD_2> --ssl -u <DB_USER> -p <DB_PASSWORD>

Restore to local mongorestore -d <DB_NAME> --drop <DUMP_FILE>

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