Skip to content

PBM-1481 Updated restore-to-time output to exclude Z #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/features/point-in-time-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Starting with version [2.4.0](../release-notes/2.4.0.md), oplog slicing runs as

Thus, if a backup snapshot is large and takes hours to make, all oplog events are saved for it, ensuring point-in-time recovery to any timestamp.

[Known limitations](known-limitations.md#oplog-slicing-for-point-in-time recovery){.md-button}
[Known limitations](known-limitations.md#oplog-slicing-for-point-in-time-recovery){.md-button}


### Oplog duration
Expand Down
20 changes: 10 additions & 10 deletions docs/troubleshoot/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ This simplifies troubleshooting since the whole information is provided in one p
========
S3 us-east-1 https://storage.googleapis.com/backup-test
Snapshots:
2020-12-16T10:36:52Z 491.98KB [restore_to_time: 2020-12-16T10:37:13Z]
2020-12-15T12:59:47Z 284.06KB [restore_to_time: 2020-12-15T13:00:08Z]
2020-12-15T11:40:46Z 0.00B [canceled: 2020-12-15T11:41:07Z]
2020-12-11T16:23:55Z 284.82KB [restore_to_time: 2020-12-11T16:24:16Z]
2020-12-11T16:22:35Z 284.04KB [restore_to_time: 2020-12-11T16:22:56Z]
2020-12-11T16:21:15Z 283.36KB [restore_to_time: 2020-12-11T16:21:36Z]
2020-12-11T16:19:54Z 281.73KB [restore_to_time: 2020-12-11T16:20:15Z]
2020-12-11T16:19:00Z 281.73KB [restore_to_time: 2020-12-11T16:19:21Z]
2020-12-11T15:30:38Z 287.07KB [restore_to_time: 2020-12-11T15:30:59Z]
2025-03-16T10:36:52Z 491.98KB [restore_to_time: 2025-03-16T10:37:13]
2025-03-15T12:59:47Z 284.06KB [restore_to_time: 2025-03-15T13:00:08]
2025-03-15T11:40:46Z 0.00B [canceled: 2025-03-15T11540307]
2025-03-11T16:23:55Z 284.82KB [restore_to_time: 2025-03-11T16:24:16]
2025-03-11T16:22:35Z 284.04KB [restore_to_time: 2025-03-11T16:22:56]
2025-03-11T16:21:15Z 283.36KB [restore_to_time: 2025-03-11T16:21:36]
2025-03-11T16:19:54Z 281.73KB [restore_to_time: 2025-03-11T16:20:15]
2025-03-11T16:19:00Z 281.73KB [restore_to_time: 2025-03-11T16:19:21]
2025-03-11T15:30:38Z 287.07KB [restore_to_time: 2025-03-11T15:30:59]
PITR chunks:
2020-12-16T10:37:13 - 2020-12-16T10:43:26 44.17KB
2025-03-16T10:37:13 - 2025-03-16T10:43:26 44.17KB
```

## `pbm-agent` logs
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/backup-selective.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

Before you start, read about [selective backups known limitations](../features/selective-backup.md#known-limitations-of-selective-backups-and-restores).
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:

Expand Down
16 changes: 8 additions & 8 deletions docs/usage/list-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ The output provides the following information:

```{.text .no-copy}
Backup snapshots:
2023-03-10T10:44:52Z <logical> [restore_to_time: 2023-03-10T10:44:56Z]
2023-03-10T10:49:20Z <physical> [restore_to_time: 2023-03-10T10:49:23Z]
2023-03-10T10:50:22Z <incremental> [restore_to_time: 2023-03-10T10:50:25Z]
2023-03-10T10:51:02Z <incremental> [restore_to_time: 2023-03-10T10:51:04Z]
2023-03-10T10:57:47Z <incremental> [restore_to_time: 2023-03-10T10:57:49Z]
2023-03-10T11:04:25Z <incremental> [restore_to_time: 2023-03-10T11:04:27Z]
2023-03-10T11:05:03Z <logical, selective> [restore_to_time: 2023-03-10T11:05:07Z]
2025-03-10T10:44:52Z <logical> [restore_to_time: 2025-03-10T10:44:56]
2025-03-10T10:49:20Z <physical> [restore_to_time: 2025-03-10T10:49:23]
2025-03-10T10:50:22Z <incremental> [restore_to_time: 2025-03-10T10:50:25]
2025-03-10T10:51:02Z <incremental> [restore_to_time: 2025-03-10T10:51:04]
2025-03-10T10:57:47Z <incremental> [restore_to_time: 2025-03-10T10:57:49]
2025-03-10T11:04:25Z <incremental> [restore_to_time: 2025-03-10T11:04:27]
2025-03-10T11:05:03Z <logical, selective> [restore_to_time: 2025-03-10T11:05:07]
```

## Restore to time

In logical backups, the completion time almost coincides with the backup finish time. To define the completion time, Percona Backup for MongoDB waits for the backup snapshot to finish on all cluster nodes. Then it captures the oplog from the backup start time up to that time.

In physical backups, the completion time is only a few seconds after the backup start time. By holding the `$backupCursor` open guarantees that the checkpoint data wont change during the backup, and Percona Backup for MongoDB can define the completion time ahead.
In physical backups, the completion time is only a few seconds after the backup start time. By holding the `$backupCursor` open guarantees that the checkpoint data won't change during the backup, and Percona Backup for MongoDB can define the completion time ahead.


## Useful links
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/pitr-selective.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

1. Before you start:

1. Read [known limitations for selective backups and restores](../features/selective-backup.md#known-limitations-of-selective-backups-and-restores).
1. Read [known limitations for selective backups and restores](../features/known-limitations.md#selective-backups-and-restores).
2. Check that you [have made a full backup](backup-selective.md) because it serves as the base for point-in-time recovery. Any selective backup is ignored.

2. To restore the desired database or a collection to a point in time, run the ``pbm restore`` command as follows:
Expand Down
18 changes: 9 additions & 9 deletions docs/usage/pitr-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
```{.bash .no-copy}
$ pbm list

2021-08-04T13:00:58Z [restore_to_time: 2021-08-04T13:01:23Z]
2021-08-05T13:00:47Z [restore_to_time: 2021-08-05T13:01:11Z]
2021-08-06T08:02:44Z [restore_to_time: 2021-08-06T08:03:09Z]
2021-08-06T08:03:43Z [restore_to_time: 2021-08-06T08:04:08Z]
2021-08-06T08:18:17Z [restore_to_time: 2021-08-06T08:18:41Z]
2025-03-04T13:00:58Z [restore_to_time: 2025-03-04T13:01:23]
2025-03-05T13:00:47Z [restore_to_time: 2025-03-05T13:01:11]
2025-03-06T08:02:44Z [restore_to_time: 2025-03-06T08:03:09]
2025-03-06T08:03:43Z [restore_to_time: 2025-03-06T08:04:08]
2025-03-06T08:18:17Z [restore_to_time: 2025-03-06T08:18:41]

PITR <off>:
2021-08-04T13:01:24 - 2021-08-05T13:00:11
2021-08-06T08:03:10 - 2021-08-06T08:18:29
2021-08-06T08:18:42 - 2021-08-06T08:33:09
2025-03-04T13:01:24 - 2025-03-05T13:00:11
2025-03-06T08:03:10 - 2025-03-06T08:18:29
2025-03-06T08:18:42 - 2025-03-06T08:33:09
```

For timestamp `2021-08-06T08:10:10`, the backup snapshot `2021-08-06T08:02:44Z [restore_to_time: 2021-08-06T08:03:09]` is used as the base for the restore as it is the most recent one.
For timestamp `2025-03-06T08:10:10`, the backup snapshot `2025-03-06T08:02:44Z [restore_to_time: 2025-03-06T08:03:09]` is used as the base for the restore as it is the most recent one.

Check notice on line 32 in docs/usage/pitr-tutorial.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/usage/pitr-tutorial.md#L32

[Google.Passive] In general, use active voice instead of passive voice ('is used').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('is used').", "location": {"path": "docs/usage/pitr-tutorial.md", "range": {"start": {"line": 32, "column": 120}}}, "severity": "INFO"}

Check notice on line 32 in docs/usage/pitr-tutorial.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/usage/pitr-tutorial.md#L32

[Google.Contractions] Use 'it's' instead of 'it is'.
Raw output
{"message": "[Google.Contractions] Use 'it's' instead of 'it is'.", "location": {"path": "docs/usage/pitr-tutorial.md", "range": {"start": {"line": 32, "column": 159}}}, "severity": "INFO"}

If you [select a backup snapshot for the restore with the `–-base-snapshot` option](#select-a-backup-snapshot-for-the-restore), the timestamp for the restore must also be later than the selected backup.

Expand Down
6 changes: 3 additions & 3 deletions docs/usage/restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@

2. Restore from a desired backup. Replace the `<backup_name>` with the desired backup in the following command:

```{.bash data-prompt="$"}
$ pbm restore <backup_name>
```
```{.bash data-prompt="$"}
$ pbm restore <backup_name>
```

Note that you can restore a sharded backup only into a sharded environment. It can be your existing cluster or a new one. To learn how to restore a backup into a new environment, see [Restoring a backup into a new environment](../features/restore-new-env.md).

Expand Down