Skip to content

Commit

Permalink
PBM-1118 Added support of custom shard names for remapping
Browse files Browse the repository at this point in the history
modified:   docs/features/selective-backup.md
	modified:   docs/usage/restore.md
	modified:   styles/Vocab/Percona/accept.txt
  • Loading branch information
nastena1606 committed Jun 28, 2023
1 parent a827620 commit 67652e1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/features/selective-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ During the restore, the reverse process occurs:
* A `pbm-agent` on each shard restores only the specified databases/collections and replays the oplog that relates only to the specified namespaces. The operations for other namespaces are ignored.
* On the config server replica set, the `pbm-agent` restores the router configuration only for the specified sharded collections. The router configuration for other databases, collections and chunks remains intact.

The restore for sharded timeseries collections is not supported.
The restore for sharded time series collections is not supported.

Check notice on line 31 in docs/features/selective-backup.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/features/selective-backup.md#L31

[Google.Contractions] Use 'isn't' instead of 'is not'.
Raw output
{"message": "[Google.Contractions] Use 'isn't' instead of 'is not'.", "location": {"path": "docs/features/selective-backup.md", "range": {"start": {"line": 31, "column": 49}}}, "severity": "INFO"}

Note that selective backups and restores operate only with data and router configuration. The cluster configuration and topology-related settings are ignored. Therefore, we recommended to restore the databases/collections on the same environment.

### Implementation specifics

During the selective restore, the primary shard for a database is set to the state it had during the backup. For example, the primary shard for the database "Staff" during backup was A. After you restore the "Staff" database, the primary shard will be set to A even if you moved the primary from A to B before the restore. All non sharded collections will be restored on A; however, they will not be deleted from B. You must take needed actions (cleanup or move the primary back to B) to maintain them.
During the selective restore, the primary shard for a database is set to the state it had during the backup. For example, the primary shard for the database "Staff" during backup was A. After you restore the "Staff" database, the primary shard will be set to A even if you moved the primary from A to B before the restore. All non-sharded collections will be restored on A; however, they will not be deleted from B. You must take needed actions (cleanup or move the primary back to B) to maintain them.

Check notice on line 37 in docs/features/selective-backup.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/features/selective-backup.md#L37

[Google.Passive] In general, use active voice instead of passive voice ('is set').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('is set').", "location": {"path": "docs/features/selective-backup.md", "range": {"start": {"line": 37, "column": 64}}}, "severity": "INFO"}

Check warning on line 37 in docs/features/selective-backup.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/features/selective-backup.md#L37

[Google.Will] Avoid using 'will'.
Raw output
{"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/features/selective-backup.md", "range": {"start": {"line": 37, "column": 246}}}, "severity": "WARNING"}

Check notice on line 37 in docs/features/selective-backup.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/features/selective-backup.md#L37

[Google.Passive] In general, use active voice instead of passive voice ('be set').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('be set').", "location": {"path": "docs/features/selective-backup.md", "range": {"start": {"line": 37, "column": 251}}}, "severity": "INFO"}

Check warning on line 37 in docs/features/selective-backup.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/features/selective-backup.md#L37

[Google.Will] Avoid using 'will'.
Raw output
{"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/features/selective-backup.md", "range": {"start": {"line": 37, "column": 353}}}, "severity": "WARNING"}

Check notice on line 37 in docs/features/selective-backup.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/features/selective-backup.md#L37

[Google.Passive] In general, use active voice instead of passive voice ('be restored').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('be restored').", "location": {"path": "docs/features/selective-backup.md", "range": {"start": {"line": 37, "column": 358}}}, "severity": "INFO"}

Check notice on line 37 in docs/features/selective-backup.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/features/selective-backup.md#L37

[Google.Semicolons] Use semicolons judiciously.
Raw output
{"message": "[Google.Semicolons] Use semicolons judiciously.", "location": {"path": "docs/features/selective-backup.md", "range": {"start": {"line": 37, "column": 374}}}, "severity": "INFO"}

Check notice on line 37 in docs/features/selective-backup.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/features/selective-backup.md#L37

[Google.Contractions] Use 'won't' instead of 'will not'.
Raw output
{"message": "[Google.Contractions] Use 'won't' instead of 'will not'.", "location": {"path": "docs/features/selective-backup.md", "range": {"start": {"line": 37, "column": 390}}}, "severity": "INFO"}

Check warning on line 37 in docs/features/selective-backup.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/features/selective-backup.md#L37

[Google.Will] Avoid using 'will'.
Raw output
{"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/features/selective-backup.md", "range": {"start": {"line": 37, "column": 390}}}, "severity": "WARNING"}

Check notice on line 37 in docs/features/selective-backup.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/features/selective-backup.md#L37

[Google.Passive] In general, use active voice instead of passive voice ('be deleted').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('be deleted').", "location": {"path": "docs/features/selective-backup.md", "range": {"start": {"line": 37, "column": 399}}}, "severity": "INFO"}

Check notice on line 37 in docs/features/selective-backup.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/features/selective-backup.md#L37

[Google.Parens] Use parentheses judiciously.
Raw output
{"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "docs/features/selective-backup.md", "range": {"start": {"line": 37, "column": 447}}}, "severity": "INFO"}


## Known limitations of selective backups and restores

1. Only **logical** backups and restores are supported.
2. Selective backups and restores are supported in sharded clusters for non-sharded collections starting with version 2.0.3. Sharded collections are supported starting with version 2.1.0.
3. Sharded timeseries collections are not supported.
3. Sharded time series collections are not supported.

Check notice on line 44 in docs/features/selective-backup.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/features/selective-backup.md#L44

[Google.Contractions] Use 'aren't' instead of 'are not'.
Raw output
{"message": "[Google.Contractions] Use 'aren't' instead of 'are not'.", "location": {"path": "docs/features/selective-backup.md", "range": {"start": {"line": 44, "column": 36}}}, "severity": "INFO"}
4. Multiple namespaces are not yet supported for selective backups. However, you can specify several namespaces for the restore (e.g., restore several collections of a database).
5. Multi-collection transactions are not yet supported for selective restore.
6. System collections in ``admin``, ``config``, and ``local`` databases cannot be backed up and restored selectively. You must make a full backup and restore to include them.
Expand Down
5 changes: 4 additions & 1 deletion docs/usage/restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ To restore a backup, use the [`pbm restore`](../reference/pbm-commands.md#pbm-re
```

This is expected behavior of periodic checks upon the database start. During the restore, the `config.system.sessions` collection is dropped but Percona Server for MongoDB recreates it eventually. It is a normal procedure. No action is required from your end.

2. Resync the backup list from the storage.
3. Start the balancer and the `mongos` node.
4. As the general recommendation, make a new base backup to renew the starting point for subsequent incremental backups.
Expand All @@ -281,7 +282,9 @@ Of course, make sure not to run **pbm backup** from the new environment whilst t

## Restoring into a cluster / replica set with a different name

Starting with version 1.8.0, you can restore **logical backups** into a new environment that has the same or more number of shards and these shards have different replica set names.
Starting with version 1.8.0, you can restore **logical backups** into a new environment that has the same or more number of shards and these shards have different replica set names.

Starting with version 2.2.0, you can restore environments that have [custom shard names](https://www.mongodb.com/docs/manual/reference/command/addShard/#mongodb-dbcommand-dbcmd.addShard).

To restore data to the environment with different replica set names, configure the name mapping between the source and target environments. You can either set the `PBM_REPLSET_REMAPPING` environment variable for `pbm` CLI or use the `--replset-remapping` flag for PBM commands. The mapping format is `<rsTarget>=<rsSource>`.

Expand Down
2 changes: 1 addition & 1 deletion styles/Vocab/Percona/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Percona XtraDB Cluster
Percona XtraBackup
Percona Toolkit
Sysbench
Ooplog
[Oo]plog
PITR
pitr
namespace
Expand Down

0 comments on commit 67652e1

Please sign in to comment.