Scalegrid automates the backup and restore of MongoDB instances. With a single click, Scalegrid will backup or restore a MongoDB instance or replica set. Since Scalegrid uses full backups, all databases, users and settings are restored on the instance. Backups are implemented using point in time snapshots and hence take the same amount of time irrespective of the size of the data. This is unlike using MongoDump/MongoRestore where your backup and recovery times increase linearly with the amount of data. Also backup has no affect on the availability of your database – your databases will continue to run as normal. MongoDirector offers both on demand and scheduled backups. The rest of this post will talk about On demand backups. If you are interested in scheduled backups for your cluster refer to this blog post – Auto MongoDB backup.
Backing up a MongoDB deployment
All backups are zipped into a single file and stored in your S3 account. Backups through MongoDirector are full backups and contain all databases present on an instance. When backing up a replica-set, MongoDirector will flush and backup files from the Primary. Backing up from the Primary ensures no data is lost due to a potential delay in sync with any of the secondaries.
MongoDirector supports both on demand and automatic MongoDB backup. This post will walk you through the on demand backup experience. To setup auto backups for your clusters refers to this post.
Backing up instances in MongoDirector is easy. To backup, select the deployment you would like to backup and then click the “Backup” button. Next provide a name for this backup.
After clicking “Backup”, the status of the deployment will change from “Running” to “BackingUp”.
Restoring a MongoDB deployment
WARNING: Restoring a MongoDB deployment will override all existing data on the MongoDB instance. Please take a backup before restoring to preserve the existing data.
Restoring a MongoDB deployment will download the zipped backup file from S3 and restore it. In the case of replica-sets, data on the secondaries will be reset with the data present on the Primary.
Restoring instances in MongoDirector is easy. To restore, select the deployment you would like to restore and then click the “Restore” button. Next select the backup you want to restore.
After clicking “Restore”, the status of the deployment will change from “Running” to “Restoring”. Restore time will vary depending on the size of data present in the MongoDB instance. In case of ReplicaSets, all SECONDARIES will be also be synced before the MongoDB deployment is in “Running” state. The MongoDB deployment will also incur downtime during the restoring phase.
As always, if you have any questions, email us at email@example.com