Charmed Operator for MongoDB

Channel Revision Published Runs on
6/stable 60 21 Oct 2024
Ubuntu 22.04
6/candidate 60 21 Oct 2024
Ubuntu 22.04
6/beta 60 21 Oct 2024
Ubuntu 22.04
6/edge 60 21 Oct 2024
Ubuntu 22.04
5/edge 39 14 Dec 2023
Ubuntu 22.04
juju deploy mongodb-k8s --channel 6/candidate
Show information

Platform:

How to restore a backup

This is a guide on how to perform a basic restore of a local backup of your Charmed MongoDB K8s replica set or sharded cluster.

Prerequisites


Determine the application to run backup actions on

The application to pass to juju when running backup and restore actions depends on whether your deployment is a replica set or sharded cluster:

When running Charmed MongoDB K8s as a replica-set, this will be the name of your MongoDB application.

When running Charmed MongoDB K8s as a sharded cluster, this will be the name of your MongoDB application running with the “config-server” role - never the shard applications.

List all backups

To list all backups available, run:

juju run <replica-set name | config-server name>/leader list-backups

This will display available backups similar to the output below:

    backup-id             | backup-type  | backup-status
    ----------------------------------------------------
    YYYY-MM-DDTHH:MM:SSZ  | logical      | finished 

Restore a backup

Before restoring a backup, check that your Charmed MongoDB K8s deployment is active and idle with juju status.

To restore a backup from the list, run the restore command using the backup-id:

juju run <replica-set name | config-server name>/leader restore backup-id=YYYY-MM-DDTHH:MM:SSZ

The restore will now be in progress.