MongoDB folder Backup vs Mongodump

77 views
Skip to first unread message

neetha...@akaaraconsulting.com

unread,
Jan 4, 2017, 3:44:04 PM1/4/17
to mongodb-user
Hi All,

 I am using mongodump command for taking Mongo backup every 1 hr ,but  I am facing performance issue so I  planned to take backup through  folder backup method  without stopping Mongo service. Please can anyone suggest me that is there any issue in taking backup through folder  without stopping Mongo service.

Rhys Campbell

unread,
Jan 5, 2017, 8:08:13 AM1/5/17
to mongodb-user
Depends on what you mean by "there any issue in taking backup through folder"

- File Copy - No
- LVM Snapshot Yes (although further complications on a sharded cluster)

Wan Bachtiar

unread,
Jan 17, 2017, 9:58:32 PM1/17/17
to mongodb-user

can anyone suggest me that is there any issue in taking backup through folder without stopping Mongo service.

Hi Neetha,

Since copying multiple files is not an atomic operation, you must stop all writes operation to the mongod before copying the files. If the data you are copying changes during the copy/backup process, your files copy will be in an invalid state.

If your storage system supports snapshots (LVM, EBS, etc), you must have journaling enabled and the journal must reside on the same logical volume as the other MongoDB data files. Without journaling enabled, there is no guarantee that the snapshot will be consistent/valid. As it’s been pointed out, see more info on Back Up by Copying Underlying Data Files

See also other MongoDB backup methods.

I am using mongodump command for taking Mongo backup every 1 hr but I am facing performance issue

Depending on your use case, If you have MongoDB replica set deployment, you could consider utilising mongodump readPreference secondary to produce backups.

Regards,

Wan.

Reply all
Reply to author
Forward
0 new messages