Is there an easy way to restore data from one cluster to another cluster. For example to restore a Test cluster from a Production cluster snapshot ?
These may be in different accounts and different projects.
Thanks
Is there an easy way to restore data from one cluster to another cluster. For example to restore a Test cluster from a Production cluster snapshot ?
These may be in different accounts and different projects.
Thanks
Is there an easy way to restore data from one cluster to another cluster. For example to restore a Test cluster from a Production cluster snapshot ?
If the clusters are within the same organisation it’s a bit easier. You’ll need the Project Owner
in both the project where the backup exists and the project where you wish to restore the backup to.
You can follow the steps outlined in the Restore your Snapshot to an Atlas Cluster documentation for restoring a backup from your “Production” cluster to a “Test” cluster.
These may be in different accounts and different projects.
For the different accounts scenario you can download and restore the snapshot locally - You may find the procedure documentation for this useful.
After downloading the backup (which is in .tar.gz
format), you’ll need to:
.tar.gz
backup filemongod
process on your local machine which will use this extracted directory as the data directory. (Example is included in the linked procedure documentation above as well)Both mongorestore
and mongodump
are available within the MongoDB database tools which you can download. Additionally, I would recommend referring to the Connect to a cluster using command line tools
documentation in assisting with the base command(s) to run for these tools.
Please note that it is necessary to whitelist the client(s) IP address(es) in the source and target MongoDB Atlas projects.
Hope this helps.
Jason
@Jason_Tran - thanks in the end I just used mongodump and mongorestore from/to the Atlas Clusters directly but it is useful to know the steps for doing so directly from a snapshot.
Thanks
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.