Data Domain - DDBoostFS Plug-In Application Validation and Best Practices for MongoDB: Mongodump
Summary: This kb provides best practices and configuration guidelines for applications with the Data Domain DD Boost File System Plug-In (BoostFS). In addition, the kb contains insights and tips on how the application should be configured to maximize all the benefits of BoostFS. ...
Instructions
MongoDB provides the mongodump utility to dump the whole database to a wanted location.
You dump the database to a BoostFS file system mounted on the server where the MongoDB database process mongod is running.
mongodump backs up the database, which can consist of several collections.
Setup BoostFS
Install BoostFS on the MongoDB server to be backed up.
How to perform backup
# mongodump --db testdb --numParallelCollections 5 --out /backup/
# mongodump --db <database_name> --numParallelCollections <no_parallel_collection_to_export> --out <path_to_boostfs_drive> --host <mongo_instance_hostname>
The use of numParallelCollections in mongodump enables us to backup n collections is parallel. If there are more than n collections in the mongodb database, they are backed up n collections at a time.
This creates the testdb directory under /backup and stores all the collections.
The numParallelCollections enables us to use multiple write streams (one per collection) to the Data Domain system.
Improving performance depends on numParallelCollections option and also if it can be used depending on the collection data base.
If the numParallelCollections option is used, but performance remains poor, then it is because the data base collection.
Example: If there is one particular collection that is of a larger size.
mongodump runs a single backup job for this particular collection, and only one connection is made.
How to perform a restore
Use mongorestore to restore the database dump to a running mongod instance.
To restore the database "data" backed up to the boostfs mount point /mnt/mongo-bkp using mongodump, use the mongorestore command as shown below. This restores the files to the database "demo-restore."
# mongorestore --db demo-restore /mnt/mongo-bkp/data/ 2016-08-24T12:58:08.675-0400 building a list of collections to restore from /mnt/mongo-bkp/datadir 2016-08-24T12:58:08.680-0400 reading metadata for demo-restore.cc from /mnt/mongo-bkp/data/cc.metadata.json 2016-08-24T12:58:08.757-0400 restoring demo-restore.cc from /mnt/mongo-bkp/data/cc.bson 2016-08-24T12:58:11.397-0400 restoring indexes for collection demo-restore.cc from metadata 2016-08-24T12:58:11.397-0400 finished restoring demo-restore.cc (75000 documents) 2016-08-24T12:58:11.398-0400 done
Restores can also be done in parallel using multiple streams. Mongorestore first opens the meta datafile, keeps it open ad begins reading the datafile, and finally closes both files, for each collection.
Performance: mongodump The following chart shows the write and read performance for this application with BoostFS compared to the same workload over NFS.
The percentages represent the amount of incremental performance measured in our labs for this use case. The write figures are based on multiple databased backups (0-3) with a change rate of 10%.
|
Number of Streams |
Single |
Multiple |
|
Writes %>NFS |
30% |
50% |
For recovery, testing has shown the restore performance of BoostFS to be about the same as NFS.
Best practices - Mongodump
- Mongodump writes the backup files to the Data Domain systems in an uncompressed format, with using either Wired Tiger or MMAPV1 storage engine.
- MongoDB backups using mongodump always dump whole databases, which are full backups.
- One Mongodump stream per MongoDB server
- Up to 63 streams per BoostFS plug-in
More Command options for boostfs mount from Configuring and using BoostFS for both Windows and Linux Guides.
|
Option |
Description |
|
|
Allow users on a client system other than the owner of the mount BoostFS. Default value: False |
Compatibility Guide for boostfs and mongodb
Data Domain BoostFS MongoDB All Simple Support Matrix November 20, 2023
Downloads and configuration guides
Boostfs Drivers & Downloads