Percona Backup for MongoDB Documentation

Percona Backup for MongoDB is a distributed, low-impact solution for achieving consistent backups of MongoDB sharded clusters and replica sets.

Percona Backup for MongoDB supports Percona Server for MongoDB and MongoDB Community v3.6 or higher with MongoDB Replication enabled.

Note

The Percona Backup for MongoDB project was inspired by (and intends to replace) mongodb_consistent_backup. This tool is not supported any longer.

Features

  • Oplog tailer
  • Oplog applier
  • AWS S3 streamer
  • AWS S3 streamer: Backup (upload)
  • Mongodump Backup Method
  • Mongodump Backup Method: Backup
  • Mongodump Backup Method: Restore
  • Agent selection algorithm
  • SSL/TLS support
  • Replica Set Backup
  • Sharded Cluster Backup
  • Command-line management utility
  • Agent and CLI integrated with MongoDB’s own authentication and authorization

How to use Percona Backup for MongoDB: going back in time (pbm restore)

In a highly-available architecture, such as MongoDB replication, there is no need to make a backup in order to recover from a problem like a disk failure. If you lose one node you can replace it by re-initializing from one of its replica set peers.

The only point of backups of a replica set is to go back in time. For example, a web application update was released on Sunday, June 9th 23:00 EST but, by 11:23 Monday, someone realizes that the update has wiped the historical data of any user who logged in due to a bug.

Nobody likes to have downtime, but it’s time to roll back: what’s the best backup to use?

$ pbm list --mongodb-uri="mongodb://172.17.0.1:27018"

Output

2019-09-10T07:04:14Z
2019-09-09T07:03:50Z
2019-09-08T07:04:21Z
2019-09-07T07:04:18Z

The most recent daily backup would include 4 hours of damage caused by the bug. Let’s restore the one before that:

$ pbm restore 2019-06-09T07:03:50Z --mongodb-uri="mongodb://172.17.0.1:27018"

Next time there is an application release, it might be best to make an extra backup manually just before:

$ pbm backup --mongodb-uri="mongodb://172.17.0.1:27018"

See also

Typical use cases of Percona Backup for MongoDB
Backing Up and Restoring Data

Contact Us

Use our Percona email address (mongodb-backup@percona.com) or the contact form on the site (https://www.percona.com/about-percona/contact) to reach us.


This Page