Skip to content
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

br: make inc + log restore compatible #18557

Merged
merged 5 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 2 additions & 0 deletions br/br-incremental-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Because restoring the incremental backup relies on the snapshot of the database

The incremental backup does not support batch renaming of tables. If batch renaming of tables occurs during the incremental backup process, the data restore might fail. It is recommended to perform a full backup after batch renaming tables, and use the latest full backup to replace the incremental data during restore.

In v8.3.0, a new configuration parameter `--allow-pitr-from-incremental` is added to control whether incremental backups and subsequent log backups are compatible. The default value is `true`, which means that incremental backups are compatible with subsequent log backups. In the case of compatibility, the DDL to be played back is scrutinized before the incremental restore begins. This mode does not yet support `ADD INDEX`, `MODIFY COLUMN`, or `REORG PARTITION`. To use incremental backups with log backups, you need to make sure that the incremental backups do not have any of the above mentioned DDLs in them. If you want to use incremental restores without log backups for the whole recovery process, you can set `--allow- pitr-from-incremental` to `false` to skip the checks in the incremental recovery phase.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

## Back up incremental data

To back up incremental data, run the `tiup br backup` command with **the last backup timestamp** `--lastbackupts` specified. In this way, br command-line tool automatically backs up incremental data generated between `lastbackupts` and the current time. To get `--lastbackupts`, run the `validate` command. The following is an example:
Expand Down
4 changes: 4 additions & 0 deletions br/br-pitr-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ Expected output:

## Restore to a specified point in time (PITR)

> **Note:**
>
> If you specify `--full-backup-storage` as the incremental backup address for `-restore point`, you need to ensure that for restores of this backup and any previous incremental backups, you set the parameter `--allow-pitr-from-incremental` to `true` to make the incremental backups compatible with the subsequent log backups.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

You can run the `tiup br restore point` command to perform a PITR on a new cluster or just restore the log backup data.

Run `tiup br restore point --help` to see the help information:
Expand Down
Loading