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
+6-9Lines changed: 6 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,11 +26,11 @@ During the backup process, Percona Backup for MongoDB stores data in the new mul
26
26
27
27
Multi-format is the default data format for both full and selective backups since it allows selective restore. Note, however, that you can make only full restores from backups made with earlier versions of Percona Backup for MongoDB.
28
28
29
-
## Backup with users and roles
29
+
## Selective backup with users and roles
30
30
31
31
### Overview
32
32
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.
33
+
Percona Backup for MongoDB allows you to perform selective backups 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.
34
34
35
35
To back up a specific namespace and include users and roles, run the following command:
`--ns="mydb.*"` specifies the namespace (all collections in mydb).
43
+
`--ns="mydb.*"`→ specifies the namespace (all collections in mydb).
44
44
45
-
`--with-users-and-roles` ensures that users and roles defined in `mydb` are included in the backup.
45
+
`--with-users-and-roles`→ ensures that users and roles defined in `mydb` are included in the backup.
46
46
47
-
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.
47
+
`--with-users-and-roles`→ 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.
48
48
49
49
50
50
??? info "What happens under the hood?"
@@ -66,10 +66,7 @@ This command backs up all collections in the **invoices** database along with it
66
66
=== "Partial Migration of a database"
67
67
As applications scale, you may need to migrate a specific database from a shared cluster to dedicated hardware. Using `--with-users-and-roles` ensures that the destination cluster immediately inherits the application-specific users and custom roles, preventing errors post-migration.
68
68
69
-
=== "Roll back access control changes"
70
-
A recent modification to custom roles in `mydb` introduced permission failures. Applications that rely on those roles can no longer perform required operations.
71
-
72
-
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.
69
+
73
70
74
71
=== "Staging environment"
75
72
To reproduce production issues or validate security patches, you need a staging environment that mirrors production exactly.
Percona Backup forMongoDB allows you to perform selective restore 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.
40
+
41
+
To restore a specific namespace and include users and roles, run the following command:
A service using `mydb` experienced accidental deletes or corruption, while other databases in the cluster remain unaffected. Selective restore limits recovery to only the required database.
70
+
71
+
=== "Roll back access control changes"
72
+
A recent modification to custom roles in`mydb` introduced permission failures. Applications that rely on those roles can no longer perform required operations.
73
+
74
+
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.
75
+
35
76
### Restore a collection under a different name
36
77
37
78
You can restore a specific collection under a different name alongside the current collection. This is useful when you troubleshoot database issues and need to compare the data in both collections to identify the root of the issue.
0 commit comments