[DOCS-590] Documentation doesn't cover how to perform filesystem level backups on Windows. Created: 08/Oct/12  Updated: 30/Oct/23  Resolved: 27/Jul/16

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

Type: Improvement Priority: Minor - P4
Reporter: William Zola Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Issue Links:
Depends
Related
is related to SERVER-3995 Allow online backups with no configur... Closed
Participants:
Days since reply: 7 years, 29 weeks ago

 Description   

Documentation doesn't cover how to perform filesystem backups on Windows.



 Comments   
Comment by Emily Hall [ 27/Jul/16 ]

Closed for housekeeping on 7/27/2016 by Emily Hall.
If you require additional support, please open a new ticket for prioritization.
Thanks,
Emily

Comment by William Zola [ 08/Oct/12 ]

Here are the ways:

1) Filesystem backup with snapshoting (Recommended)

A) Set up

Make sure you're using journaling (on by default)
Make sure the journal file is on the same partition as the data files (true by default)
Make sure the file system supports snapshotting via Volume Copy Shadow Service, or other facility (NetApp snapshots, etc.)

B) Backup procedure:

Make a filesystem snapshot of the MongoDB data files and journal file

C) Recovery procedure:

Stop any running 'mongod.exe' process
Restore the filesystem snapshot into its old location
Restart 'mongod.exe', using the restored data files and journal file

2) Filesystem backup

A) Backup procedure:

Connect to the secondary node: run the db.fsyncLock() command and wait for it to complete
Make an OS-level copy of the MongoDB data files (journal file not required)
Run the 'db.fsyncUnlock()' command

NOTE: replication to this node will be blocked from the time you begin the fsyncLock() until the time that you run the fsyncUnlock(). You need to make sure that you have enough time in the oplog so that the secondary can re-sync after the fsyncUnlock(). You also need to make sure that you have enough spare capacity on the secondary to be able to catch up.

B) Recovery procedure:

Stop any running 'mongod.exe' process
Delete any existing journal files
Restore the MongoDB data files
Restart 'mongod.exe', using the restored data files

Generated at Thu Feb 08 07:39:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.