Introducing our new CEO Don Johnson - Read More

percona/percona-backup-mongodb

Verified Publisher

By Percona

Updated 30 days ago

Image
4

1M+

logo

Percona Backup for MongoDB

Percona Backup for MongoDB is an open-source, distributed and low-impact solution for consistent backups of MongoDB clusters, including sharding support. Backup your data without notable performance and operating degradation.

Key features include:

  • Logical backups and restores
  • Physical (a.k.a. ‘hot’) backup and restore
  • Incremental backups
  • Point-in-time recovery
  • Selective logical backups and restores
  • PITR and backup management interface via the Percona Monitoring and Management tool

Percona Backup for MongoDB is compatible with the following MongoDB versions:

  • For logical backups - Percona Server for MongoDB and MongoDB Community v4.4 and higher with MongoDB Replication enabled.

  • For physical backups - Percona Server for MongoDB starting from versions 4.4.6-8, 5.0 and higher with MongoDB Replication enabled and WiredTiger configured as the storage engine.

For more information and related downloads for Percona Backup for MongoDB® and other Percona products, please visit http://www.percona.com.

Read Product Documentation

Percona Backup for MongoDB Docker Images

Percona Backup for MongoDB Docker images are created and maintained by the Percona team.

Images are updated when new releases are published.

How to Use the Images

Start Percona Backup for MongoDB

Start Percona Backup for MongoDB container as follows:

docker run --name container-name  -e PBM_MONGODB_URI="mongodb://<PBM_USER>:<PBM_USER_PASSWORD>@<HOST>:<PORT>" -d percona/percona-backup-mongodb:tag

Where:

  • container-name is the name you want to assign to your container,
  • PBM_MONGODB-URI is a MongoDB Connection URI string used to connect to MongoDB nodes, and
  • tag is the tag specifying the version and architecture you need. See the list above for relevant tags, or look at the full list of tags.

Note that every MongoDB node (including replica set secondary members and config server replica set nodes) requires a separate instance of Percona Backup for MongoDB. Thus, a typical, 3-node MongoDB replica set requires three instances of Percona Backup for MongoDB.

Set up Percona Backup for MongoDB

Percona Backup for MongoDB requires the remote storage where to store data. Use the following commands to configure it:

  1. Start a Bash session:

    docker run --name container-name bash

  2. Create a config file:

    touch /tmp/pbm_config.yaml

  3. Specify remote storage parameters in the config file:

    storage:
    	type: s3
    	s3:
    	  region: <your-region-here>
    	  bucket: <your-bucket-here>
          credentials:
            access-key-id: <your-access-key-id-here>
    	secret-access-key: <your-secret-key-here>
    
  4. Upload the config file:

    pbm config --file /tmp/pbm_config.yaml

Run Percona Backup for MongoDB

Percona Backup for MongoDB command line utility (pbm) provides the set of commands to control backups: create, restore, cancel backups, etc.

For example, to start a backup, use the following command:

docker run --name container-name pbm backup

where container-name is the name you assigned to the container and pbm backup is the command to start a backup.

In the same way you can run other pbm commands. Find the full list of available commands in Percona Backup for MongoDB reference.

User Feedback

We welcome your feedback!

Docker Pull Command

docker pull percona/percona-backup-mongodb