From d5a0738242c00d259f3616d595c6e0e2d8aee694 Mon Sep 17 00:00:00 2001 From: houfaxin Date: Mon, 12 Aug 2024 10:44:39 +0800 Subject: [PATCH 1/5] initial trans --- br/br-incremental-guide.md | 2 ++ br/br-pitr-manual.md | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/br/br-incremental-guide.md b/br/br-incremental-guide.md index 56f159b5ef102..6509211d51808 100644 --- a/br/br-incremental-guide.md +++ b/br/br-incremental-guide.md @@ -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. + ## 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: diff --git a/br/br-pitr-manual.md b/br/br-pitr-manual.md index d4c9076ea1949..0929bfe520e50 100644 --- a/br/br-pitr-manual.md +++ b/br/br-pitr-manual.md @@ -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. + 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: From a8f3811e6f50297c3f6d0be31806512ff3ae49e0 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Mon, 12 Aug 2024 11:12:07 +0800 Subject: [PATCH 2/5] Update br/br-pitr-manual.md Co-authored-by: BornChanger <97348524+BornChanger@users.noreply.github.com> --- br/br-pitr-manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/br-pitr-manual.md b/br/br-pitr-manual.md index 0929bfe520e50..bd0ccbcd77ea9 100644 --- a/br/br-pitr-manual.md +++ b/br/br-pitr-manual.md @@ -343,7 +343,7 @@ Expected output: > **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. +> 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. You can run the `tiup br restore point` command to perform a PITR on a new cluster or just restore the log backup data. From a08693f4fe2805d0363d193d1d3732502329a88d Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Mon, 12 Aug 2024 16:23:28 +0800 Subject: [PATCH 3/5] Update br/br-pitr-manual.md --- br/br-pitr-manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/br-pitr-manual.md b/br/br-pitr-manual.md index bd0ccbcd77ea9..5a8e128d5d627 100644 --- a/br/br-pitr-manual.md +++ b/br/br-pitr-manual.md @@ -343,7 +343,7 @@ Expected output: > **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. +> If you specify `--full-backup-storage` as the incremental backup address for `restore point`, for restores of this backup and any previous incremental backups, you need to set the parameter `--allow-pitr-from-incremental` to `true` to make the incremental backups compatible with the subsequent log backups. You can run the `tiup br restore point` command to perform a PITR on a new cluster or just restore the log backup data. From f81431c9d4d29cce0fb5d982c9128d475ad3fefe Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Wed, 14 Aug 2024 15:40:15 +0800 Subject: [PATCH 4/5] Update br/br-incremental-guide.md --- br/br-incremental-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/br-incremental-guide.md b/br/br-incremental-guide.md index 6509211d51808..b1090447c2914 100644 --- a/br/br-incremental-guide.md +++ b/br/br-incremental-guide.md @@ -17,7 +17,7 @@ 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. +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. Otherwise, these three DDLs cannot be replayed correctly. 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. ## Back up incremental data From b209051fb8387b397344f7b7954c85a468a55b43 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Thu, 15 Aug 2024 14:32:47 +0800 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Lilian Lee --- br/br-incremental-guide.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/br/br-incremental-guide.md b/br/br-incremental-guide.md index b1090447c2914..e7b4815cf75f9 100644 --- a/br/br-incremental-guide.md +++ b/br/br-incremental-guide.md @@ -17,7 +17,11 @@ 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. Otherwise, these three DDLs cannot be replayed correctly. 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. +Starting from v8.3.0, the `--allow-pitr-from-incremental` configuration parameter is introduced 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. + +- When you keep the default value `true`, the DDLs that need to be replayed are strictly checked before the incremental restore begins. This mode does not yet support `ADD INDEX`, `MODIFY COLUMN`, or `REORG PARTITION`. If you want to use incremental backups together with log backups, make sure that none of the preceding DDLs exist during the incremental backup process. Otherwise, these three DDLs cannot be replayed correctly. + +- If you want to use incremental restores without log backups during the whole recovery process, you can set `--allow-pitr-from-incremental` to `false` to skip the checks in the incremental recovery phase. ## Back up incremental data