Skip to content

PBM-1294 selective logical backup/restore with Users & Roles#337

Open
rasika-chivate wants to merge 69 commits intomainfrom
PBM-1294-selective-logical-backup/restore-with-Users-&-Roles
Open

PBM-1294 selective logical backup/restore with Users & Roles#337
rasika-chivate wants to merge 69 commits intomainfrom
PBM-1294-selective-logical-backup/restore-with-Users-&-Roles

Conversation

@rasika-chivate
Copy link
Collaborator

@rasika-chivate rasika-chivate commented Feb 9, 2026

Provide a detailed documentation of the command used for selective backup and restore. Include instructions on how to optionally include related users and roles in the backup and restoration process. Ensure that all syntax, parameters, and examples are clearly explained.

Refer to the ticket PBM-1294 for more information.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Before you start, read about [selective backups known limitations](../features/known-limitations.md#selective-backups-and-restores).

To make a selective backup, run the `pbm backup` command and provide the value for the `--ns` flag in the format `<database.collection>`. The `--ns` flag value is case sensitive. For example, to back up the "Payments" collection, run the following command:
To make a selective backup, run the pbm backup command and provide the value for the --ns flag in the format <database.collection>. The --ns flag value is case sensitive. For example, to back up the "Payments" collection, run the following command:
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command references pbm backup and --ns flag are missing backtick formatting for consistency with the rest of the documentation. The format should use backticks around code elements like pbm backup and --ns to match the formatting style used elsewhere in the line and throughout the documentation.

Copilot uses AI. Check for mistakes.
Comment on lines 30 to 34
3. To restore the desired database to a point in time, **along with users and roles**:

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

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The numbering structure appears inconsistent. Step 2 (line 17) contains nested substeps and describes the general restore command, while step 3 (line 30) introduces a variation with --with-users-and-roles. Consider restructuring this as a substep of step 2 (e.g., "2.a" or as a note within step 2) or adding more context to explain why this is a separate numbered step, since it's a variation of the same restore operation rather than a distinct preparatory action.

Copilot uses AI. Check for mistakes.

## Selective backup with users and roles

!!! admonition "Version added: [2.13.0](../release-notes/2.13.0.md)"
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link references ../release-notes/2.13.0.md, but this file does not exist in the docs/release-notes directory. The latest release notes file is 2.12.0.md. Either create the 2.13.0.md release notes file or update the link to point to an existing release notes file. The same issue exists on line 16 of docs/features/selective-backup.md.

Suggested change
!!! admonition "Version added: [2.13.0](../release-notes/2.13.0.md)"
!!! admonition "Version added: [2.12.0](../release-notes/2.12.0.md)"

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be added later.

```bash
pbm backup --ns=invoices.*
```
To back up multiple namespaces, specify them as a comma-separated list for the --ns flag: `<db1.col1>,<db2.*>,<db3.*>`. The number of namespaces to specify is unlimited.
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --ns flag reference is missing backtick formatting. It should be `--ns` to be consistent with the formatting style used throughout the documentation.

Copilot uses AI. Check for mistakes.
- To restore without the users and roles, skip the `--with-users-and-roles` flag.

During the restore, Percona Backup for MongoDB retrieves the file for the specified database / collection and restores it.
- You can specify several namespaces as a comma-separated list for the `--ns` flag: `<db1.*>,<db2.*>`. For example, `--ns=customers.*,invoices.*`.
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line has an extra leading space before the hyphen, causing inconsistent indentation with the other bullet points (lines 31 and 35). The indentation should match the other bullets in this list.

Suggested change
- You can specify several namespaces as a comma-separated list for the `--ns` flag: `<db1.*>,<db2.*>`. For example, `--ns=customers.*,invoices.*`.
- You can specify several namespaces as a comma-separated list for the `--ns` flag: `<db1.*>,<db2.*>`. For example, `--ns=customers.*,invoices.*`.

Copilot uses AI. Check for mistakes.
3. To restore the desired database to a point in time, **along with users and roles**:

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

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flag syntax --ns "db.*" (with a space) differs from the syntax used elsewhere in the documentation which consistently uses --ns="db.*" (with an equals sign and quotes). For example, see lines 28 and 53 in restore-selective.md and line 73 in features/selective-backup.md. Standardize the syntax to match the rest of the documentation.

Copilot uses AI. Check for mistakes.
rasika-chivate and others added 4 commits February 24, 2026 21:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Sandra Romanchenko <53295797+sandraromanchenko@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants