The Application Database stores your Ops Manager settings, operation history, and backup metadata. When you deploy the Application Database as an external Application Database, the Kubernetes Operator manages it as a standard MongoDB custom resource, which means that Ops Manager can back it up and restore it like any other MongoDB deployment that the Kubernetes Operator manages.
To deploy an external Application Database, see the following procedures:
Why Back Up the Application Database
An Ops Manager deployment with an internally managed Application Database stores the Application Database inside the Ops Manager custom resource, where standard backup tooling can't reach it. If Ops Manager itself fails, you can lose control of the deployments that it manages.
Backing up an external Application Database addresses the following needs:
Disaster recovery. Restore the Application Database after data loss, data corruption, or a failed configuration change.
Operational safety net. Roll back an erroneous bulk write to the moment before it happened.
Lower recovery objectives. Continuous oplog capture supports lower recovery point and recovery time objectives than a strategy based on periodic snapshots alone.
What Application Database Backup Provides
Ops Manager keeps a copy of the Application Database data and a continuous stream of oplog entries, which lets you do the following:
Restore a full snapshot of the Application Database to a new or existing deployment.
Restore the Application Database to any point in time between snapshots by replaying the oplog to a timestamp that you choose.
Query a backup snapshot without restoring it. To learn more, see Configure Queryable Backups for Ops Manager Resources.
Meet retention and compliance requirements, optionally with immutable snapshots.
Architecture
An external Application Database deployment uses the following resources:
Resource | Description |
|---|---|
Management Ops Manager | An Ops Manager resource with its own internally managed Application Database. The management Ops Manager instance doesn't manage your databases. It manages the project that contains the external Application Database, and it acts as the recovery engine if you lose the primary Ops Manager instance. Deploy it in a separate failure domain, such as a different availability zone. |
External Application Database | A MongoDB resource with |
Primary Ops Manager | The Ops Manager resource that manages your databases. It omits |
Because a new Ops Manager instance can't start without an Application Database, and a MongoDB resource with spec.role set to AppDB can't reconcile without an available Ops Manager instance, the management Ops Manager instance is a prerequisite for an external Application Database. Deploy it before you deploy the external Application Database.
If you lose the primary Ops Manager instance, you use the management Ops Manager instance to restore the external Application Database, then recreate the primary Ops Manager instance against the restored Application Database, then restore your MongoDB workloads.
Backup and the External Application Database
Ops Manager stores backup metadata in the Application Database, and both the Ops Manager Application and the Backup Daemon connect to the Application Database. When you reference an external Application Database with spec.externalApplicationDatabaseRef, the Kubernetes Operator handles this connection for you:
The Kubernetes Operator resolves the TLS configuration and CA of the referenced MongoDB resource and applies it to both the Ops Manager StatefulSet and the Backup Daemon StatefulSet. The Backup Daemon trusts a TLS-enabled external Application Database the same way it trusts an internally managed one.
The Backup Daemon connects using the same connection string that the Kubernetes Operator computes for the Ops Manager Application.
Enabling backup doesn't change. You set spec.backup.enabled on the primary Ops Manager resource, as you would for an internally managed Application Database. The only difference is where the Application Database runs.
To back up the external Application Database itself, enable backup on the MongoDB resource that represents it, in the project that the management Ops Manager instance manages. To learn more, see Configure MongoDB Database Backups.
Migration Annotations
During a migration between an internally managed Application Database and an external Application Database, the Kubernetes Operator sets an annotation on the Application Database StatefulSet to record that the StatefulSet is ready to change owners. The Kubernetes Operator sets and reads these annotations. Don't set them yourself.
Annotation | Description |
|---|---|
| The Ops Manager resource released the StatefulSet so that the MongoDB resource can take ownership of it. The Kubernetes Operator sets this annotation when you migrate from an internally managed Application Database to an external Application Database. To learn more, see Migrate an Application Database to an External Deployment. |
| The MongoDB resource released the StatefulSet so that the Ops Manager resource can reclaim it. The Kubernetes Operator sets this annotation when you return an external Application Database to internal management. To learn more, see Return an External Application Database to Ops Manager. |
Requirements
Before you back up an external Application Database, complete the following tasks:
Configure an external Application Database for the primary Ops Manager resource. To learn more, see Deploy Ops Manager with an External Application Database or Migrate an Application Database to an External Deployment.
Back up the encryption key secret that the Kubernetes Operator creates for the Ops Manager resource. The Kubernetes Operator names this secret
<om-resource-name>-gen-key, and Ops Manager can't read the Application Database without it. To learn more, see Encryption Key.Configure snapshot storage for the management Ops Manager instance. To learn more, see Configure File System Backup Store with Kubernetes Operator.
Limitations
External Application Database backup has the following limitations:
The external Application Database must be a MongoDB resource on a single Kubernetes cluster. The Kubernetes Operator rejects MongoDBMultiCluster resources and MongoDB resources that use a multi-cluster topology. Multi-cluster support is planned for a later release.
This feature doesn't replicate the Application Database across regions or across Kubernetes clusters.
This feature doesn't back up or restore Ops Manager state other than the Application Database itself.
This feature doesn't change how you back up or restore the MongoDB deployments that you manage with Ops Manager.
The Kubernetes Operator doesn't support
automationConfigoverrides for an external Application Database, because the MongoDB resource has no equivalent setting.The Kubernetes Operator doesn't support
spec.applicationDatabase.passwordSecretKeyRefduring migration to an external Application Database. The Kubernetes Operator generates a new password and rotates any password that you provided.When you reference an existing MongoDB deployment as an external Application Database, you take on responsibility for the day-to-day management of that deployment. The Kubernetes Operator provides no tool that reconciles the MongoDB resource configuration with the internally managed Application Database configuration. You must specify that configuration yourself.