Skip to content

Commit

Permalink
Add the new upgrade_safe flag to the backup documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
  • Loading branch information
dbussink committed Jul 12, 2023
1 parent b24d21b commit 9dba77e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions content/en/docs/18.0/reference/programs/vtbackup.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ While it is running, `vtbackup` serves debugging info and metrics on port `15500
| --topo_zk_tls_ca | string | the server ca to use to validate servers when connecting to the zk topo server |
| --topo_zk_tls_cert | string | the cert to use to connect to the zk topo server, requires topo_zk_tls_key, enables TLS |
| --topo_zk_tls_key | string | the key to use to connect to the zk topo server, enables TLS |
| --upgrade_safe | boolean | Whether to use innodb_fast_shutdown=0 for the backup so it is safe to use for MySQL upgrades |
| --v | Level | log level for V logs |
| -v, --version | | print binary version |
| --vmodule | moduleSpec | comma-separated list of pattern=N settings for file-filtered logging |
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/18.0/reference/programs/vtctl/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] <tablet alias> <sql command>` |
| [ExecuteFetchAsDba](../vtctl/tablets#executefetchasdba) | `ExecuteFetchAsDba -- [--max_rows=10000] [--disable_binlogs] [--json] <tablet alias> <sql command>` |
| [VReplicationExec](../vtctl/tablets#vreplicationexec) | `VReplicationExec -- [--json] <tablet alias> <sql command>` |
| [Backup](../vtctl/tablets#backup) | `Backup -- [--concurrency=4] [--allow_primary=false] <tablet alias>` |
| [Backup](../vtctl/tablets#backup) | `Backup -- [--concurrency=4] [--allow_primary=false] [--upgrade_safe=false] <tablet alias>` |
| [RestoreFromBackup](../vtctl/tablets#restorefrombackup) | `RestoreFromBackup <tablet alias>` |
| [ReparentTablet](../vtctl/tablets#reparenttablet) | `ReparentTablet <tablet alias>` |

Expand All @@ -55,7 +55,7 @@ Note that wherever `vtctl` commands produced master or MASTER for tablet type, t
| [RemoveShardCell](../vtctl/shards#removeshardcell) | `RemoveShardCell -- [--force] [--recursive] <keyspace/shard> <cell>` |
| [DeleteShard](../vtctl/shards#deleteshard) | `DeleteShard -- [--recursive] [--even_if_serving] <keyspace/shard> ...` |
| [ListBackups](../vtctl/shards#listbackups) | `ListBackups <keyspace/shard>` |
| [BackupShard](../vtctl/shards#backupshard) | `BackupShard -- [--allow_primary=false] <keyspace/shard>` |
| [BackupShard](../vtctl/shards#backupshard) | `BackupShard -- [--allow_primary=false] [--upgrade_safe=false] <keyspace/shard>` |
| [RemoveBackup](../vtctl/shards#removebackup) | `RemoveBackup <keyspace/shard> <backup name>` |
| (DEPRECATED) [InitShardPrimary](../vtctl/shards#initshardprimary) | `InitShardPrimary -- [--force] [--wait_replicas_timeout=<duration>] <keyspace/shard> <tablet alias>` |
| [PlannedReparentShard](../vtctl/shards#plannedreparentshard) | `PlannedReparentShard -- --keyspace_shard=<keyspace/shard> [--new_primary=<tablet alias>] [--avoid_tablet=<tablet alias>] [--wait_replicas_timeout=<duration>]` |
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/18.0/reference/programs/vtctl/shards.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ Lists all the backups for a shard.
### BackupShard

```
BackupShard -- [--allow_primary=false] <keyspace/shard>
BackupShard -- [--allow_primary=false] [--upgrade_safe=false] <keyspace/shard>
```

### RemoveBackup
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/18.0/reference/programs/vtctl/tablets.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,14 +382,14 @@ Stops mysqld and uses the [BackupEngine](../../../../user-guides/operating-vites

#### Example

<pre class="command-example">Backup -- [--concurrency=4] &lt;tablet alias&gt;</pre>
<pre class="command-example">Backup -- [--concurrency=4] [--upgrade_safe=false] &lt;tablet alias&gt;</pre>

#### Flags

| Name | Type | Definition |
| :-------- | :--------- | :--------- |
| concurrency | Int | Specifies the number of compression/checksum jobs to run simultaneously |

| upgrade_safe | Boolean | Whether to use <code>innodb_fast_shutdown=0</code> for the backup so it is safe to use for MySQL upgrades |

#### Arguments

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ series: vtctldclient
Uses the BackupStorage service on the given tablet to create and store a new backup.

```
vtctldclient Backup [--concurrency <concurrency>] [--allow-primary] <tablet_alias>
vtctldclient Backup [--concurrency <concurrency>] [--allow-primary] [--upgrade_safe] <tablet_alias>
```

### 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)
--upgrade_safe Whether to use innodb_fast_shutdown=0 for the backup so it is safe to use for MySQL upgrades.
-h, --help help for Backup
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ 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 <concurrency>] [--allow-primary] <keyspace/shard>
vtctldclient BackupShard [--concurrency <concurrency>] [--allow-primary] [--upgrade_safe] <keyspace/shard>
```

### 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)
--upgrade_safe Whether to use innodb_fast_shutdown=0 for the backup so it is safe to use for MySQL upgrades.
-h, --help help for BackupShard
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ To continue with risk: Set `--xtrabackup_backup_flags=--no-server-version-check`
__Run the following vtctl command to create a backup:__

```sh
vtctldclient --server=<vtctld_host>:<vtctld_port> Backup <tablet-alias>
vtctldclient --server=<vtctld_host>:<vtctld_port> Backup [--upgrade_safe=false] <tablet-alias>
```

If the engine is `builtin`, replication will be stopped prior to shutting down mysqld for the backup.
Expand All @@ -95,8 +95,8 @@ If the engine is `xtrabackup`, the tablet can continue to serve traffic while th

__Run the following vtctl command to backup a specific shard:__

```sh
vtctldclient --server=<vtctld_host>:<vtctld_port> BackupShard [--allow_primary=false] <keyspace/shard>
``` sh
vtctldclient --server=<vtctld_host>:<vtctld_port> BackupShard [--allow_primary=false] [--upgrade_safe=false] <keyspace/shard>
```

## Create an incremental backup with vtctl
Expand Down

0 comments on commit 9dba77e

Please sign in to comment.