0

I need a daily backup of all MongoDB databases in our single-instance server (without stopping the MongoDB service). Our server is in Rackspace so I'm wondering if a valid strategy could be just add all the database files (files in dbpath) to our automatic backup.

I've considered another options as well, but this will save us a lot of time and seems simpler and easier. The question is: is this solution reliable?

1

1 Answer 1

1

without stopping the MongoDB service [...] is this solution reliable?

as is, no.

have a look at Backup by Copying Underlying Data Files

in order to have a consistent backup, the data you are backing up must not change during the whole backup process.

you said you can't stop the server so:

  • use LVM/filesystem snapshots

or

  • setup a replicaset, and perform backup with it. you'll be able to freeze/stop it as you want.
2
  • Is not reliable in which sense? The backup could miss some data? Or the backup could be corrupt and unrecoverable? Our data is not critical, we can assume some losses... (sorry, perhaps this should be a part of my question). Apr 10, 2014 at 15:25
  • 1
    I'm very unsure, but I think mongodb could still start on corrupted data. considering it as a system crash and trying to recover what it can be with journaling. if you use database references for example, it could be broken because the referenced document is missing
    – exeral
    Apr 10, 2014 at 16:23

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.