Skip to content

Instantly share code, notes, and snippets.

@bertrandmartel
Created April 14, 2020 01:42
Show Gist options
  • Save bertrandmartel/ca58d9f92ab09fea1ede18f7dfa25fe6 to your computer and use it in GitHub Desktop.
Save bertrandmartel/ca58d9f92ab09fea1ede18f7dfa25fe6 to your computer and use it in GitHub Desktop.
Migrate from DocumentDB to DocumentDB using mongodump/mongorestore
mongodump --host [HOST] --username [USER] \
--password [PASSWORD] --db rfp --authenticationDatabase admin \
--readPreference secondary --ssl --sslCAFile rds-combined-ca-bundle.pem --sslAllowInvalidCertificates
mongorestore --uri="mongodb://<target_username>:<target_password>@<target_host>/?authSource=admin&replicaSet=rs0" \
--ssl --sslCAFile rds-combined-ca-bundle.pem --sslAllowInvalidCertificates \
--numInsertionWorkersPerCollection 64 dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment