To reduce the impact on my primary node when adding a new secondary, I'd like it to perform the initial sync from an existing secondary.
The rs.syncFrom command seems perfect for that:
http://docs.mongodb.org/manual/tutorial/configure-replica-set-secondary-sync-target/
Note however, that the page mentions:
To affect the sync target for the initial sync, run rs.syncFrom()http://docs.mongodb.org/manual/reference/method/rs.syncFrom/#rs.syncFromoperation before initial sync.
My question is, how do I run rs.syncFrom before the initial sync? If I run it before the new member is added to the replica set, I get the error "can't get local.system.replset config from self or any seed (EMPTYCONFIG)". If I add the member, it immediately starts the initial sync, and I can't run the command anymore.
Another suggested approach is, sync by copying files from another member. among these two suggested methods which one will have less burden on primary and which takes less time to complete ?