Skip to content

Instantly share code, notes, and snippets.

@ryanvgates
Created May 5, 2021 21:48
Show Gist options
  • Save ryanvgates/6145a26771f5493d0ce72927a19c645c to your computer and use it in GitHub Desktop.
Save ryanvgates/6145a26771f5493d0ce72927a19c645c to your computer and use it in GitHub Desktop.
Rename MongoDB With Restore
mongodump --gzip --archive=$(date +"%Y_%m_%d-%H_%M_%S")_dbname --ssl --uri="mongodb://user:[email protected]:27017,replicaset-1.com:27017,replicaset-2.com:27017/old_db_name?authSource=old_db_name&replicaSet=resp1&ssl=true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment