Skip to content

Commit 0b3ea71

Browse files
added use cases
1 parent 278ea85 commit 0b3ea71

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

docs/usage/backup-selective.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Multi-format is the default data format for both full and selective backups sinc
2828

2929
## Selective backup with users and roles
3030

31+
### Overview
32+
3133
Percona Backup for MongoDB allows you to perform selective backups and restores of databases and collections. Additionally, you can choose to include **users and roles defined** in the database in your selective backup, ensuring that access control is restored along with the data.
3234

3335
This feature is useful in the following cases:
@@ -51,7 +53,7 @@ where:
5153
The `--with-users-and-roles` flag ensures that any custom users and roles defined within the target database are included, maintaining the integrity of your access control list (ACL) without needing a full cluster restore.
5254

5355

54-
??? info "What heppens under the hood?"
56+
??? info "What happens under the hood?"
5557
- Percona Backup for MongoDB captures all collections within `mydb`.
5658
- Percona Backup for MongoDB filters the users and roles for entities where the `db` field matches `mydb`.
5759
- Global roles or users defined in the admin database for other namespaces are excluded.
@@ -64,6 +66,21 @@ pbm backup --ns="invoices.*" --with-users-and-roles
6466

6567
This command backs up all collections in the **invoices** database along with its users and roles.
6668

69+
### Use cases
70+
71+
=== "Split/partial Migration of a single database"
72+
Organizations often start with a shared cluster hosting multiple databases for different services. Over time, scaling, performance, or compliance needs may require isolating one database into its own dedicated cluster.
73+
74+
=== "Roll back access control changes"
75+
A recent modification to custom roles in `mydb` introduced permission failures. Applications that rely on those roles can no longer perform required operations. To ensure full recovery, you need to restore not just the data but also the users and roles tied to the database’s access-control.
76+
77+
=== "Staging/test environment"
78+
You need a production-like copy of `mydb` in a separate environment to reproduce issues, validate fixes, or conduct testing.
79+
80+
By backing up mydb together with its users and roles, the copy reflects not only the data but also the access-control model. This enables accurate reproduction of permission-related behavior such as read/write restrictions, role grants, and user privileges.
81+
82+
83+
6784

6885

6986
## Next steps

0 commit comments

Comments
 (0)