Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.

Restore from a Stored Snapshot

Overview

With Backup, you can restore from a stored snapshot or build a custom snapshot reflecting a different point in the last 24 hours. For all backups, restoring from a stored snapshot is faster than restoring from a custom snapshot in the last 24 hours.

By default, Backup automatically takes and stores a snapshot every 6 hours. Snapshots remain available for restoration following the snapshot retention policy.

For replica sets, you will receive one .tar.gz file containing your data; for sharded clusters, you will receive a series of .tar.gz files.

Procedure

1

Select the Backups tab, and then select either Sharded Cluster Status or Replica Set Status.

2

Click the name of the sharded cluster or replica set to restore.

Ops Manager displays your selection’s stored snapshots.

3

Select the snapshot from which to restore.

To select a stored snapshot, click the Restore this snapshot link next to the snapshot.

To select a custom snapshot, click the Restore button at the top of the page. In the resulting page, select a snapshot as the starting point. Then select the Use Custom Point In Time checkbox and enter the point in time in the Date and Time fields. Ops Manager includes all operations up to but not including the point in time. For example, if you select 12:00, the last operation in the restore is 11:59:59 or earlier. Click Next.

4

Select HTTP as the delivery method for the snapshot.

In the Delivery Method field, select Pull via Secure HTTP (HTTPS).

Optionally, you can instead choose SCP as the delivery method. See: Retrieve a Snapshot with SCP Delivery for the SCP delivery option’s configuration. If you choose SCP, you must provide the hostname and port of the server to receive the files and provide access to the server through a username and password or though an SSH key. Follow the instructions on the Ops Manager screen.

5

Finalize the request.

Click Finalize Request and confirm your identify via two-factor verification. Then click Finalize Request again.

6

Retrieve the snapshot.

To download the snapshot, select the Ops Manager Backup tab and then select Restore Jobs. When the restore job completes, select the download link next to the snapshot.

For a sharded clusters, Ops Manager provides several download links for the several .tar.gz files.

7

Extract the data files from the .tar.gz archive created by the backup service.

tar -zxvf <tarball-name>.tar.gz
8

Select the location where the mongod will access the data files.

The directory you choose will become the mongod’s data directory. You can either create a new directory or use the existing location of the extracted data files.

If you create a new directory, move the files to that directory.

If you use the existing location of the extracted data files, you can optionally create a symbolic link to the location using the following command, where <hash>-<rsname>-<time> is the name of the snapshot and <dbpath> is the data directory:

ln -s <hash>-<rsname>-<time>/ <dbpath>
9

Start the mongod with the new data directory as the dbpath.

In the mongod configuration, set the dbpath option to the path of the data directory that holds the data files from the Backup snapshot.

mongod --dbpath /data/db