Backing up MongoDB data

You can define backup jobs to protect your MongoDB data. To regularly back up your data, define a backup job that includes a service level agreement (SLA) policy.

Before you begin

During the initial backup operation, IBM Spectrum® Protect Plus creates a vSnap volume and NFS share. During incremental backups, the previously created volume is reused. The IBM Spectrum Protect Plus MongoDB agent mounts the share on the MongoDB server where the backup is completed.

Review the following prerequisites before you create a backup job definition:
Restriction: Do not run inventory jobs at the same time that backup jobs are scheduled.

Procedure

  1. In the navigation panel, expand Manage Protection > Databases > MongoDB.
  2. Select the check box for the instance that you want to back up.

    Under each MongoDB instance, data to be backed up is listed as ALL. Each instance in the Instances pane is listed by instance name, version, and the applied SLA policy.

  3. Optional: Click Select Options to specify the number of parallel streams for the backup operation, and then click Save. By selecting an appropriate number of parallel streams, you can minimize the time that is required for the backup job.
    The saved options are used for all backup jobs for this instance as selected.
  4. To run the backup job with these options, click the instance name, select the ALL database representation, and click Run.
    The backup job begins, and you can view the details in Jobs and Operations > Running Jobs.
    Tip: The Run button is only enabled if an SLA policy is applied to the ALL representation of the databases.

    To run an on-demand backup job for multiple databases that are associated with an SLA policy, click Create job, select Ad hoc backup, and follow the instructions in Running an ad hoc backup job.

  5. Select the instance again, and click Select an SLA Policy to choose an SLA policy.
  6. Save the SLA selection.
    To define a new SLA or to edit an existing policy with custom retention and frequency rates, select Manage Protection > Policy Overview. In the SLA Policies pane, click Add SLA Policy, and define policy preferences.

What to do next

After the SLA policy is saved, you can run the policy at any time by clicking Actions for that policy name, and selecting Start. The status in the log changes to show that the backup job is in the Running state.

To cancel a job that is running, click Actions for that policy name and select Cancel. A message asks whether you want to keep the data that is already backed up. Choose Yes to keep the backed up data, or No to discard the backup.

Important: If the backup operation fails with an error, follow the procedure described in Troubleshooting failed backup operations for large Db2 and MongoDB databases.