Databases Reference
In-Depth Information
Tip #37: Start up normally after a crash
If you were running with journaling and your system crashes in a recoverable way (i.e.,
your disk isn't destroyed, the machine isn't underwater, etc.), you can restart the da-
tabase normally. Make sure you're using all of your normal options, especially --
dbpath (so it can find the journal files) and --journal , of course. MongoDB will take
care of fixing up your data automatically before it starts accepting connections. This
can take a few minutes for large data sets, but it shouldn't be anywhere near the times
that people who have run repair on large data sets are familiar with (probably five
minutes or so).
Journal files are stored in the journal directory. Do not delete these files.
Tip #38: Take instant-in-time backups of durable servers
To take a backup of a database with journaling enabled, you can either take a filesystem
snapshot or do a normal fsync +lock and then dump. Note that you can't just copy all
of the files without fsync and locking, as copying is not an instantaneous operation.
You might copy the journal at a different point in time than the databases, and then
your backup would be worse than useless (your journal files might corrupt your data
files when they are applied).
 
Search WWH ::




Custom Search