Navigation

Back Up Ops Manager

    Deploying the Ops Manager Backup Blockstore and Application databases as replica sets is key to protect the databases from failure.

    Ensure you configure and deploy your replica sets for failover and redundancy.

    See also

    To learn more about replica set architecture:

    Beyond using MongoDB’s replication capabilities, you can create backups for the Backup Blockstore database and Application database, both for longterm storage of snapshots, and for backing up Ops Manager for disaster recovery purposes.

    To restore Ops Manager, you only need backups of the Application database and the Backup Blockstore database. Ops Manager’s other components are stateless: you can rebuild them from the installation package if need be.

    Important

    Your Backup installation cannot back up Ops Manager. If you wish to use Ops Manager to back up Ops Manager, you will need two Ops Manager installations: one to back up your MongoDB deployment, and another to back up your Ops Manager databases.

    Back Up with the Public API

    The Ops Manager Public API allows you to programmatically restore snapshots on your desired schedule, and store them offline. Ideally, you should save the backups to a tape drive, appending the new snapshots daily until the drive is full, and then store the drive offsite.

    Programmatically restoring snapshots has the same impact on a snapshot as a typical restore.

    See the API documentation for how to restore jobs using this method.

    This method backs up the snapshots only: you cannot use the backups to restore Ops Manager in the event that a Blockstore database is lost.

    Shut Down and Back Up Ops Manager

    To perform a full backup of all snapshots contained in Ops Manager, including the point-in-time restores:

    Use this procedure to back up the Ops Manager Application on hosts running Microsoft Windows:

    1

    Shut down your Ops Manager instance.

    To shutdown the Ops Manager service:

    1. Click the Start button.
    2. Click Administrative Tools.
    3. Click Services.
    4. Right-click the MongoDB Ops Manager HTTP Service and select Stop.

    This shuts down the Backup Daemon and the head database that it uses. This prevents any further snapshots from being created.

    2

    Back up the Ops Manager configuration files.

    Back up the configuration directory and gen.key file. By default, Ops Manager stores these in the following locations:

    • <installPath>\Server\Config\
    • <installPath>\MMSData\Secrets\gen.key

    By default, Ops Manager sets <configLogPath> to C:\MMSData.

    Warning

    If you lose the gen.key file, your Ops Manager instance can’t connect to the application or backup databases.

    3

    Shut down your Ops Manager application database.

    To shutdown the Ops Manager application database:

    1. Log in to the Windows Server hosting the application database.

    2. Click the Start button.

    3. Click Administrative Tools.

    4. Click Services.

    5. Right-click the MongoDB Server and select Stop.

      Note

      This MongoDB instance may display as:

      • MongoDB (Port XXXXX), if you’re running more than one instance on this host.
      • <Custom Name>, if you installed MongoDB as a service using a custom service name.
    4

    Shut down your Ops Manager backup databases.

    To shutdown the Ops Manager service:

    1. Log in to the Windows Server hosting the application database.

    2. Click the Start button.

    3. Click Administrative Tools.

    4. Click Services.

    5. Right-click the MongoDB Server and select Stop.

      Note

      These MongoDB instances may display as:

      • MongoDB (Port XXXXX), if you’re running more than one instance on this host.
      • <Custom Name>, if you installed MongoDB as a service using a custom service name.
    5

    Back up the supporting file systems.

    While they are offline, use your preferred method to back up the file systems that store:

    Use this procedure to back up the Ops Manager Application on hosts installed using deb packages:

    1

    Shut down your Ops Manager instance.

    Issue the following command to stop the Ops Manager Application:

    sudo service mongodb-mms stop
    

    This shuts down the Backup Daemon and the head database that it uses. This prevents any further snapshots from being created.

    2

    Back up the Ops Manager configuration files.

    Back up the configuration directory and gen.key file. By default, Ops Manager stores these in the following locations:

    • /opt/mongodb/mms/conf
    • /etc/mongodb-mms/gen.key

    Warning

    If you lose the gen.key file, your Ops Manager instance can’t connect to the application or backup databases.

    3

    Shut down your Ops Manager application database.

    1. Locate the connection strings for the application database from mongo.mongoUri in the conf-mms.properties file.

    2. Log in to the application database using mongo.

    3. Invoke the db.shutdownServer() command:

      db.getSiblingDB('admin').shutdownServer({});
      
    4

    Shut down your Ops Manager backup databases.

    For each backup database in your Ops Manager installation including:

    Repeat the following steps:

    1. Locate the connection strings for the backup databases from the Snapshot Storage.

    2. Log in to each database using mongo.

    3. Invoke the db.shutdownServer() command:

      db.getSiblingDB('admin').shutdownServer({});
      
    5

    Back up the supporting file systems.

    While they are offline, use your preferred method to back up the file systems that store:

    Use this procedure to back up the Ops Manager Application on hosts installed using rpm packages:

    1

    Shut down your Ops Manager instance.

    Issue the following command to stop the Ops Manager Application:

    sudo service mongodb-mms stop
    

    This shuts down the Backup Daemon and the head database that it uses. This prevents any further snapshots from being created.

    2

    Back up the Ops Manager configuration files.

    Back up the configuration directory and gen.key file. By default, Ops Manager stores these in the following locations:

    • /opt/mongodb/mms/conf
    • /etc/mongodb-mms/gen.key

    Warning

    If you lose the gen.key file, your Ops Manager instance can’t connect to the application or backup databases.

    3

    Shut down your Ops Manager application database.

    1. Locate the connection strings for the application database from mongo.mongoUri in the conf-mms.properties file.

    2. Log in to the application database using mongo.

    3. Invoke the db.shutdownServer() command:

      db.getSiblingDB('admin').shutdownServer({});
      
    4

    Shut down your Ops Manager backup databases.

    For each backup database in your Ops Manager installation including:

    Repeat the following steps:

    1. Locate the connection strings for the backup databases from the Snapshot Storage.

    2. Log in to each database using mongo.

    3. Invoke the db.shutdownServer() command:

      db.getSiblingDB('admin').shutdownServer({});
      
    5

    Back up the supporting file systems.

    While they are offline, use your preferred method to back up the file systems that store:

    Use this procedure to back up Linux systems that don’t use deb or rpm packages.

    1

    Shut down your Ops Manager instance.

    Issue the following command to stop the Ops Manager Application:

    sudo service mongodb-mms stop
    

    This shuts down the Backup Daemon and the head database that it uses. This prevents any further snapshots from being created.

    2

    Back up the Ops Manager configuration files.

    Back up the configuration directory and gen.key file. By default, Ops Manager stores these in the following locations:

    • /opt/mongodb/mms/conf
    • /etc/mongodb-mms/gen.key

    Warning

    If you lose the gen.key file, your Ops Manager instance can’t connect to the application or backup databases.

    3

    Shut down your Ops Manager application database.

    1. Locate the connection strings for the application database from mongo.mongoUri in the conf-mms.properties file.

    2. Log in to the application database using mongo.

    3. Invoke the db.shutdownServer() command:

      db.getSiblingDB('admin').shutdownServer({});
      
    4

    Shut down your Ops Manager backup databases.

    For each backup database in your Ops Manager installation including:

    Repeat the following steps:

    1. Locate the connection strings for the backup databases from the Snapshot Storage.

    2. Log in to each database using mongo.

    3. Invoke the db.shutdownServer() command:

      db.getSiblingDB('admin').shutdownServer({});
      
    5

    Back up the supporting file systems.

    While they are offline, use your preferred method to back up the file systems that store:

    While this procedure makes all of Ops Manager’s backup snapshots and the PIT restores available, it involves significant downtime, During the shutdown, Ops Manager, monitoring, and automation are unavailable.

    As a result, if one of your MongoDB instances fails:

    • You may lose the data that Ops Manager didn’t back up prior to shutdown.
    • You can’t be alerted of the loss of data.