[DOCS-12174] Clarify how much down time is needed for iterative rsync approach to initial sync Created: 01/Nov/18  Updated: 30/Oct/23  Resolved: 13/Mar/23

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Arnie Listhaus Assignee: Unassigned
Resolution: Won't Do Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 47 weeks, 2 days ago

 Description   

Description

Our docs currently state:

Back Up with cp or rsync
If your storage system does not support snapshots, you can copy the files directly using cp, rsync, or a similar tool. Since copying multiple files is not an atomic operation, you must stop all writes to the mongod before copying the files. Otherwise, you will copy the files in an invalid state.

However, the procedure for rsync does not need to include downtime for the duration of the initial sync if we use an iterative rsync process e.g.:

1. Shut down target node
2. run rsync against a secondary in the replica set while it is live
3. repeat step 2 multiple times until the time to complete the rsync process is much smaller than your oplog window
4. run db.fsyncLock on the sync source being used
5. run rsync one last time - this will be fast
6. run db.fsyncUnlock on sync source
7. startup target node - it will sync with any new updates that occurred after the db.fsyncLock. This will be very quick.

A sample rsync command should be included in the docs e.g.:

rsync -avKkz --progress --del root@hostname-of-sync-source:/opt/mongo/ /opt/mongo/

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Ashley Brown [ 13/Mar/23 ]

Hi, we're closing this ticket because the discussion appears to invalidate the ask. If you believe this is an error, please reopen the ticket with a comment explaining why and we'll take a look. Thanks!

Generated at Thu Feb 08 08:04:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.