3 ms·
Something that surprises me about MongoDB is that they always talk about how this is for humungous data sets. But then MongoDB does not seem to support online/
by Nitramp 16y ago
Something that surprises me about MongoDB is that they always talk about how this is for humungous data sets.
But then MongoDB does not seem to support online/hot backups without setting the whole system to read only. Incremental backups are not supported at all, AFAICS. If a server crashes, you're up to some really lengthy fsck action before your server is back up.
I don't understand how people actually make this work. If you have a huge databases, a complete backup is going to take too long to make setting your system to read-only feasible. And if a server crashes, even if you have a hot standby replica, if you have to do several hours of fsck before you can restore regular operations, that doesn't sound good either.
It's nice to see movement in the database market, and MongoDB looks really good from a front-end side (JS, indexes, queries, ...); but I think it really is lacking some crucial features.
- mathias_10gen 16y agoYou don't have to set your whole system to read only for the entirety of the backup. There are three ways to avoid it: 1) Use mongodump which queries for every object in the database. It will produce a compacted file, but does not do a point-in-time snapshot. 2) Take a backup from a slave. You can either set it to read-only mode, or just shut it down and copy the files. 3) Run MongoDB on top of LVM. LVM supports almost instant snapshotting because it uses copy on write. Once the snapshot has been made (usually less than a few seconds) you can resume the server for read-write operations. Note that all three options can be combined. You could make an LVM snapshot of a read slave then use mongodump's --dbpath option to produce compacted backup files. Please see http://www.mongodb.org/display/DOCS/Backups http://www.mongodb.org/display/DOCS/Backups for more details.
- rbranson 16y agoI second the snapshotting using the disk system. It would be nice to be able to do this without locking the database, but LVM or ZFS snapshots take fractions of a second to create. In the mean time, pending transactions will just wait.
- epochwolf 16y ago> But then MongoDB does not seem to support online/hot backups without setting the whole system to read only. mongodump -> http://www.mongodb.org/display/DOCS/Import+Export+Tools#ImportExportTools-mongodump http://www.mongodb.org/display/DOCS/Import+Export+Tools#Impo...
- mrkurt 16y agoThey intend for you to handle this by having read slaves (or using replica sets in 1.6). If your master fails, you can manually fail over to a read slave. Replica sets handle this for you automatically. You can also pull a read slave out and do whatever you need to with it, then reconnect and have it catch up. MongoDB is really designed to be run on at least 2 servers.