Database Backups & Exports

NodeChef performs snapshot backups of your mongodb database every 16 hours. These backups are compressed into a .zip file. Each collection is stored in a seperate file in the zip archive with name [collection_name].json. Information about indexes created for each collection can be found in the __ncCollectionIndexes__.json file in the zip archive.

Your BSON documents in each collection are converted into a standard JSON format using the MongoDB Extended JSON format. You can import the JSON data into any mongodb compatible database using tools like MongoChef.

To download your backups, navigate to the Nodechef dashboard and find your app listed under the task manager. Click on DB actions and select backups. Click on the Download Zip Bundle link to download the zip archive.

Nodechef MongoDB Backups

__ncCollectionIndexes__.json Format

{ collections : [ { CollectionName : "logs", CollectionIndexes : [ { "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "mydb.logs" } .... ] } ] }

Data file format

{ <document> }<CRLF newline> { <document> }<CRLF newline> { <document> }

Exporting backups to S3 and other Block storage services

Login to the NodeChef dashboard. From the task manager, navigate to DB Actions > Backups > Remote archiving. You can then configure your S3 Credentials.

The NodeChef platform will save your backups to the configured S3 bucket after every backup of your database. You are responsible for managing these files that is deleting them from your bucket when you no longer need them.