Skip to content

Commit 8b8dd40

Browse files
Update backup-selective.md
1 parent ff13963 commit 8b8dd40

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/usage/backup-selective.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ This feature is useful in the following cases:
3636

3737
- Restoring a subset of collections along with the users and roles that manage them.
3838

39+
To back up a specific namespace and include users and roles, run the following command:
40+
41+
```sh
42+
pbm backup --ns="mydb.*" --with-users-and-roles
43+
```
44+
45+
where:
46+
47+
`--ns="mydb.*"` specifies the namespace (all collections in mydb).
48+
49+
`--with-users-and-roles` ensures that users and roles defined in mydb are included in the backup.
50+
51+
3952
## Next steps
4053

4154
[List backups](../usage/list-backup.md){.md-button}

0 commit comments

Comments
 (0)