0

I need to restore a replica set. Unfortunately my lack of experience as administrator (I'm not) let me with the only solution of restore the replica using the data of the primary db (the only replica element still alive) as a "seed". At the moment I'm copying the files of the primary to secondary PC using rsync (there are 600G to copy). Then I have three questions regarding the restore:

1 - Once the files are copied should I use this data as the dbpath of the secondary?

2- Is the "local" db of primary copied? This may be a silly question but in https://docs.mongodb.com/manual/tutorial/resync-replica-set-member/#replica-set-resync-by-copying the say to be sure that this db is copied along with the data files, and I'm not sure about it.

3- How long it will take to "synchronize" with primary once I start the mongod instance in the secondary PC?

0
  1. Yes
  2. Yes, if you copy all dbpath files from primary (what is stopped; or you use file system snapshot), then local database is copied too
  3. It depends.. If nothing is inserted to primary during rsync, about one second... If there is lot's of inserts, updates, deletes at primary, then more than few seconds.
  • thanks I already did it and it worked perfectly. Thanks for your answer. – Karina Panucia May 8 '18 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.