Savory's Backup Service
Still working on documenting this feature, though it's otherwise pretty complete!
Refer to the Savory.Backup API documentation for more details.
What It Does
Let's you do a live export of your MongoDB databases and collections to JSON, optionally gzipping the output to save space. You can set up your application's crontab to have the backup run regularly.
Backups are very, very fast: even very large databases can be fully exported in durations measured in seconds or minutes.
Why Not Use MongoDB's mongodump or mongoexport Tools?
From our experience, the admin tools that come with MongoDB are overly simplistic and unreliable.
Otherwise, Savory's backup service offers the following advantages:
- Thoughput: Because we're using the Java MongoDB driver underneath, with its support for connection pooling, we can achieve much higher througput than the command line tools, which use a single connection. The default is to use 5 threads (and thus 5 connection at most) at once.
- True JSON: The mongoexport tool does not export a real JSON array, instead it exports each document as a JSON dict, separating each document with a newline. Savory exports a standard JSON array, readable from any standard JSON parser.
- Consistency: Works with the same MongoDB connection as your application, guaranteeing that you're backing up exactly the same data your application sees. This is especially important in a sharded or replica set deployment.
- Fully integrated: You don't have to create bash scripts to backup your DB. Instead, you can stay in JavaScript and Savory and your regular application code.
- Iterators: The backup service uses Savory iterators, so you can transform your data in various ways while backing up, or even include non-MongoDB data.

