diff --git a/content/en/docs/18.0/reference/programs/vtctl/_index.md b/content/en/docs/18.0/reference/programs/vtctl/_index.md index ad19b24f2..628f1e7e9 100644 --- a/content/en/docs/18.0/reference/programs/vtctl/_index.md +++ b/content/en/docs/18.0/reference/programs/vtctl/_index.md @@ -32,7 +32,7 @@ Note that wherever `vtctl` commands produced master or MASTER for tablet type, t | [ExecuteFetchAsApp](../vtctl/tablets#executefetchasapp) | `ExecuteFetchAsApp -- [--max_rows=10000] [--json] [--use_pool] ` | | [ExecuteFetchAsDba](../vtctl/tablets#executefetchasdba) | `ExecuteFetchAsDba -- [--max_rows=10000] [--disable_binlogs] [--json] ` | | [VReplicationExec](../vtctl/tablets#vreplicationexec) | `VReplicationExec -- [--json] ` | -| [Backup](../vtctl/tablets#backup) | `Backup -- [--concurrency=4] [--allow_primary=false] [--upgrade-safe=false] ` | +| [Backup](../vtctl/tablets#backup) | `Backup -- [--concurrency=4] [--allow_primary=false] [--upgrade-safe=false] [--incremental-from-pos=] ` | | [RestoreFromBackup](../vtctl/tablets#restorefrombackup) | `RestoreFromBackup ` | | [ReparentTablet](../vtctl/tablets#reparenttablet) | `ReparentTablet ` | @@ -55,7 +55,7 @@ Note that wherever `vtctl` commands produced master or MASTER for tablet type, t | [RemoveShardCell](../vtctl/shards#removeshardcell) | `RemoveShardCell -- [--force] [--recursive] ` | | [DeleteShard](../vtctl/shards#deleteshard) | `DeleteShard -- [--recursive] [--even_if_serving] ...` | | [ListBackups](../vtctl/shards#listbackups) | `ListBackups ` | -| [BackupShard](../vtctl/shards#backupshard) | `BackupShard -- [--allow_primary=false] [--upgrade-safe=false] ` | +| [BackupShard](../vtctl/shards#backupshard) | `BackupShard -- [--allow_primary=false] [--upgrade-safe=false] ` [--incremental_from_pos=] | | [RemoveBackup](../vtctl/shards#removebackup) | `RemoveBackup ` | | (DEPRECATED) [InitShardPrimary](../vtctl/shards#initshardprimary) | `InitShardPrimary -- [--force] [--wait_replicas_timeout=] ` | | [PlannedReparentShard](../vtctl/shards#plannedreparentshard) | `PlannedReparentShard -- --keyspace_shard= [--new_primary=] [--avoid_tablet=] [--wait_replicas_timeout=]` | diff --git a/content/en/docs/18.0/reference/programs/vtctl/shards.md b/content/en/docs/18.0/reference/programs/vtctl/shards.md index 39c4833e5..66e70fc6d 100644 --- a/content/en/docs/18.0/reference/programs/vtctl/shards.md +++ b/content/en/docs/18.0/reference/programs/vtctl/shards.md @@ -325,7 +325,7 @@ Lists all the backups for a shard. ### BackupShard ``` -BackupShard -- [--allow_primary=false] [--upgrade-safe=false] +BackupShard -- [--allow_primary=false] [--upgrade-safe=false] [--incremental-from-pos=] ``` ### RemoveBackup diff --git a/content/en/docs/18.0/reference/programs/vtctldclient/vtctldclient_BackupShard.md b/content/en/docs/18.0/reference/programs/vtctldclient/vtctldclient_BackupShard.md index 6a637c4b1..35b785272 100644 --- a/content/en/docs/18.0/reference/programs/vtctldclient/vtctldclient_BackupShard.md +++ b/content/en/docs/18.0/reference/programs/vtctldclient/vtctldclient_BackupShard.md @@ -13,16 +13,17 @@ Finds the most up-to-date REPLICA, RDONLY, or SPARE tablet in the given shard an If no replica-type tablet can be found, the backup can be taken on the primary if --allow-primary is specified. ``` -vtctldclient BackupShard [--concurrency ] [--allow-primary] [--upgrade-safe] +vtctldclient BackupShard [--concurrency ] [--allow-primary] [--incremental-from-pos=|auto] [--upgrade-safe] ``` ### Options ``` - --allow-primary Allow the primary of a shard to be used for the backup. WARNING: If using the builtin backup engine, this will shutdown mysqld on the primary and stop writes for the duration of the backup. - --concurrency uint Specifies the number of compression/checksum jobs to run simultaneously. (default 4) - -h, --help help for BackupShard - --upgrade-safe Whether to use innodb_fast_shutdown=0 for the backup so it is safe to use for MySQL upgrades. + --allow-primary Allow the primary of a shard to be used for the backup. WARNING: If using the builtin backup engine, this will shutdown mysqld on the primary and stop writes for the duration of the backup. + --concurrency uint Specifies the number of compression/checksum jobs to run simultaneously. (default 4) + -h, --help help for BackupShard + --incremental-from-pos string Position of previous backup. Default: empty. If given, then this backup becomes an incremental backup from given position. If value is 'auto', backup taken from last successful backup position + --upgrade-safe Whether to use innodb_fast_shutdown=0 for the backup so it is safe to use for MySQL upgrades. ``` ### Options inherited from parent commands diff --git a/content/en/docs/18.0/user-guides/operating-vitess/backup-and-restore/creating-a-backup.md b/content/en/docs/18.0/user-guides/operating-vitess/backup-and-restore/creating-a-backup.md index 992de396f..5eda514e3 100644 --- a/content/en/docs/18.0/user-guides/operating-vitess/backup-and-restore/creating-a-backup.md +++ b/content/en/docs/18.0/user-guides/operating-vitess/backup-and-restore/creating-a-backup.md @@ -101,7 +101,7 @@ vtctldclient --server=: BackupShard [--allow_primary=f ## Create an incremental backup with vtctl -An incremental backup requires additional information: the point from which to start the backup. An incremental backup is taken by supplying `--incremental-from-pos` to the `Backup` command. The argument may either indicate a valid position, or the value `auto`. Examples: +An incremental backup requires additional information: the point from which to start the backup. An incremental backup is taken by supplying `--incremental-from-pos` to the `Backup` or `BackupShard` command. The argument may either indicate a valid position, or the value `auto`. Examples: ```sh vtctldclient Backup --incremental-from-pos="MySQL56/0d7aaca6-1666-11ee-aeaf-0a43f95f28a3:1-53" zone1-0000000102 @@ -109,6 +109,8 @@ vtctldclient Backup --incremental-from-pos="MySQL56/0d7aaca6-1666-11ee-aeaf-0a43 vtctldclient Backup --incremental-from-pos="0d7aaca6-1666-11ee-aeaf-0a43f95f28a3:1-53" zone1-0000000102 vtctldclient Backup --incremental-from-pos="auto" zone1-0000000102 + +vtctldclient BackupShard --incremental-from-pos=auto commerce/0 ``` When indicating a position, you may choose to use or to omit the `MySQL56/` prefix (which you can find in the backup manifest's Position). @@ -122,8 +124,6 @@ An incremental backup fails in these scenarios: - It is unable to find binary log files that covers the requested position. This can happen if the binary logs are purged earlier than the incremental backup was taken. It essentially means there's a gap in the changelog events. **Note** that while on one tablet the binary logs may be missing, another tablet may still have binary logs that cover the requested position. - There is no change to the database since the requested position, i.e. the GTID position has not changed since. -`v17` only supports `--incremental-from-pos` in the `Backup` command, not in `BackupShard`. Also, only `vtctlclient` supports the flag, where `vtctldclient` does not. `v18` is expected to support incremental backups for `BackupShard` and for `vtctldclient`. - ## Backing up Topology Server The Topology Server stores metadata (and not tablet data). It is recommended to create a backup using the method described by the underlying plugin: