How to create a backup

This is a guide on how to create and list backups of a Charmed MongoDB replica set or sharded cluster using Amazon S3 storage.

Prerequisites

Create a backup

First, determine the name of the application to pass to Juju when running back up and restore actions:

  • For a replica-set deployment, it is the name of your Charmed MongoDB application

  • For a sharded cluster deployment, it is the name of the Charmed MongoDB application with the config-server role. Never the shard applications!


Check that your MongoDB deployment is active and idle with juju status.

To create a backup, use the create-backup action on the leader unit:

juju run <replica-set name | config-server name>/leader create-backup

List all backups

To list all available, failed, and in-progress backups, use the list-backup action on the leader unit:

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