Monday 26 February 2024

MongoDB backup restore to remote locations

 

Mongo DB backup restore from one remote location to another remote location

  1. Login to a machine where mongoshell is installed.
  2. From inside mongoshell run the command: mongodump --uri "mongodb://:@/" --archive | mongorestore --uri "mongodb://:@/" --archive --nsExclude "admin.system.*"
  3. Reference: https://www.mongodb.com/docs/atlas/import/mongorestore/

No comments:

Post a Comment