- User Guide >
- Backup Use and Operation >
- Restore MongoDB Instances with MMS Backup >
- Seed a New Secondary from Backup Restore
Seed a New Secondary from Backup Restore¶
On this page
Overview¶
When a natural synchronization of a new secondary host costs too much time or resources, seeding a secondary from a backup restore is a faster better alternative. Seeding also does not hit a live mongo instance to retrieve data.
Prerequisites¶
To seed a secondary from a backup restore file, you must have:
- A backup restore file.
- The
seedSecondary.sh
file included in the backup restore file.
Considerations¶
The seedSecondary.sh file will not be in the backup restore if you have blacklisted dbs or collections or have resynced your backup after the snapshot (or for config servers). In these cases, including the script would cause an inconsistent secondary. In the case of a blacklist, your secondary would not include some collections which would cause problems for your deployment.
Seeding a new secondary from a backup restore requires an oplog window on the current primary that spans back to the snapshot’s timestamp.
Procedure¶
Remove the broken secondary from your replica set.¶
Login to the server on which to create the new secondary.¶
Bring up new node as a standalone.¶
Where ALTERNATEPORT
is not the usual port your secondary runs on.