Skip to content

Commit

Permalink
Docs: vttablet PITR via --restore-to-timestamp and --restore-to-posit…
Browse files Browse the repository at this point in the history
…ion (#1594)

* Docs: vttablet PITR via --restore_to_timestamp and --restore_to_position

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>

* dashes, not underscores

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>

* vttablet-docs

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>

* Apply changes to 19.0

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>

---------

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
  • Loading branch information
shlomi-noach authored Oct 10, 2023
1 parent 03f3177 commit cc4a10c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion content/en/docs/18.0/reference/features/recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ aliases: ['/docs/recovery/pitr','/docs/reference/pitr/']

## Point in Time Recovery

Vitess supports incremental backup and recoveries, AKA point in time recoveries. `v17` offers restore-to-position functionality, and `v18` is slated to support restore-to-timestamp functionality in addition.
Vitess supports incremental backup and recoveries, AKA point in time recoveries. It supports both restore-to-timestamp and (one second resolution) as well as restore-to-position (precise GTID set).

Point in time recoveries are based on full and incremental backups. It is possible to recover a database to a position that is _covered_ by some backup.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ Restores can be done automatically by way of seeding/bootstrapping new tablets,

When a tablet starts, Vitess checks the value of the `--restore_from_backup` command-line flag to determine whether to restore a backup to that tablet. Restores will always be done with whichever engine was used to create the backup.

* If the flag is present, Vitess tries to restore the most recent backup from the [BackupStorage](../overview/#backup-storage-services) system when starting the tablet or if the `--restore_from_backup_ts` flag (Vitess 12.0+) is also set then using the latest backup taken at or before this timestamp instead. Example: '2021-04-29.133050'
* If the flag is absent, Vitess does not try to restore a backup to the tablet. This is the equivalent of starting a new tablet in a new shard.
If the flag is absent, Vitess does not try to restore a backup to the tablet. This is the equivalent of starting a new tablet in a new shard. If the flag is present, then the tablet is seeded by a backup, as follows:

- If `--restore-to-timestamp` or `--restore-to-pos` flags are provided, then this is a [point in time recovery](../overview/#restore-types). The tablet auto selects a good full backup followed by a series of incremental backups, that collectively bring it up to date with requested timestamp or position. The tablet is set to `DRAINED` type, and does not begin replicating.
- If neither of these flags is present, then the tablet is running a _full_ restore. Vitess tries to restore the most recent backup from the [BackupStorage](../overview/#backup-storage-services) system when starting the tablet. Or, if the `--restore_from_backup_ts` flag is also set then using the latest backup taken at or before this timestamp instead. Example: `"2021-04-29.133050"`

This flag is generally enabled all of the time for all of the tablets in a shard. By default, if Vitess cannot find a backup in the Backup Storage system, the tablet will start up empty. This behavior allows you to bootstrap a new shard before any backups exist.

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/19.0/reference/features/recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ aliases: ['/docs/recovery/pitr','/docs/reference/pitr/']

## Point in Time Recovery

Vitess supports incremental backup and recoveries, AKA point in time recoveries. `v17` offers restore-to-position functionality, and `v18` is slated to support restore-to-timestamp functionality in addition.
Vitess supports incremental backup and recoveries, AKA point in time recoveries. It supports both restore-to-timestamp and (one second resolution) as well as restore-to-position (precise GTID set).

Point in time recoveries are based on full and incremental backups. It is possible to recover a database to a position that is _covered_ by some backup.

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/19.0/reference/programs/vttablet/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: vttablet
series: vttablet
commit: e73ce917ed97a6a8586cd3647cb2f498fe908a0e
commit: 22f1f7d281be40c4267dc3095004af481b9ea1d1
---
## vttablet

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ Restores can be done automatically by way of seeding/bootstrapping new tablets,

When a tablet starts, Vitess checks the value of the `--restore_from_backup` command-line flag to determine whether to restore a backup to that tablet. Restores will always be done with whichever engine was used to create the backup.

* If the flag is present, Vitess tries to restore the most recent backup from the [BackupStorage](../overview/#backup-storage-services) system when starting the tablet or if the `--restore_from_backup_ts` flag (Vitess 12.0+) is also set then using the latest backup taken at or before this timestamp instead. Example: '2021-04-29.133050'
* If the flag is absent, Vitess does not try to restore a backup to the tablet. This is the equivalent of starting a new tablet in a new shard.
If the flag is absent, Vitess does not try to restore a backup to the tablet. This is the equivalent of starting a new tablet in a new shard. If the flag is present, then the tablet is seeded by a backup, as follows:

- If `--restore-to-timestamp` or `--restore-to-pos` flags are provided, then this is a [point in time recovery](../overview/#restore-types). The tablet auto selects a good full backup followed by a series of incremental backups, that collectively bring it up to date with requested timestamp or position. The tablet is set to `DRAINED` type, and does not begin replicating.
- If neither of these flags is present, then the tablet is running a _full_ restore. Vitess tries to restore the most recent backup from the [BackupStorage](../overview/#backup-storage-services) system when starting the tablet. Or, if the `--restore_from_backup_ts` flag is also set then using the latest backup taken at or before this timestamp instead. Example: `"2021-04-29.133050"`

This flag is generally enabled all of the time for all of the tablets in a shard. By default, if Vitess cannot find a backup in the Backup Storage system, the tablet will start up empty. This behavior allows you to bootstrap a new shard before any backups exist.

Expand Down

0 comments on commit cc4a10c

Please sign in to comment.