Mongorestore Documentdb Online
: DocumentDB requires TLS/SSL by default. Download the global bundle certificate to verify the connection.
mongodump --uri="mongodb+srv://source-cluster" --gzip --out=./backup mongorestore --host docdb-2023-xxxxx.cluster-xyz.us-east-1.docdb.amazonaws.com:27017 \ --ssl --sslAllowInvalidHostnames \ --username admin --password secure123 \ --authenticationDatabase admin \ --numInsertionWorkers 8 --batchSize 500 \ --gzip \ --nsInclude "myapp.*" \ ./backup mongorestore documentdb
DocumentDB uses SCRAM (default) or AWS IAM authentication. For SCRAM, pass --username and --password . For IAM, you need a separate plugin ( --authenticationMechanism MONGODB-AWS ) — available in mongorestore version 4.4+. : DocumentDB requires TLS/SSL by default
Restoring large datasets can be time-consuming because mongorestore is an offline process that incurs downtime proportional to data size. For SCRAM, pass --username and --password
: DocumentDB requires SSL by default. Download the Amazon RDS Global Bundle and reference it using the --sslCAFile flag.
Replace the placeholders with your DocumentDB account details, database name, and collection name.