You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage/backup-selective.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,8 @@ Multi-format is the default data format for both full and selective backups sinc
28
28
29
29
## Selective backup with users and roles
30
30
31
+
### Overview
32
+
31
33
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.
32
34
33
35
This feature is useful in the following cases:
@@ -51,7 +53,7 @@ where:
51
53
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.
52
54
53
55
54
-
??? info "What heppens under the hood?"
56
+
??? info "What happens under the hood?"
55
57
- Percona Backup for MongoDB captures all collections within `mydb`.
56
58
- Percona Backup for MongoDB filters the users and roles for entities where the `db` field matches `mydb`.
57
59
- Global roles or users defined in the admin database for other namespaces are excluded.
This command backs up all collections in the **invoices** database along with its users and roles.
66
68
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.
0 commit comments