Skip to content

Rate this page
Thanks for your feedback
Thank you! The feedback has been submitted.

For help, click the link below to get free database assistance or contact our experts for personalized support.

Point-in-time recovery from selected databases and collections

Important

Supported only for replica sets. Available for logical backups.

Before you start:

  1. Read known limitations for selective backups and restores.
  2. Check that you have made a full backup because it serves as the base for point-in-time recovery. Any selective backup is ignored.

Restore the specified database or collection to a designated point in time

Run the restore command as follows:

```bash
pbm restore --base-snapshot <backup_name> --time <timestamp> \
--ns <db.collection>
```

To restore the desired database to a point in time, along with users and roles run:

```bash
pbm restore --time <timestamp> --ns "db.*" --with-users-and-roles
```

Version added: 2.14.0

Before a restore operation is executed you have to confirm the action (to bypass it, add the -y or --yes flag).

You can specify the selective backup as the base snapshot for the Point-in-time restore. In this case, Percona Backup for MongoDB restores only the namespace(s) included in this backup to the specified time.

Alternatively, you can use a full backup snapshot and restore the desired namespaces (databases or collections) up to the specific time from it. Specify them as the comma-separated list for the pbm restore command.

When point-in-time recovery is started, Percona Backup for MongoDB uses the provided base snapshot, restores the specified namespace(s) and replays oplog on top of it up to the specified time. If no base snapshot is provided, Percona Backup for MongoDB uses the most recent full backup snapshot.


Last update: April 29, 2026
Created: April 29, 2026