Skip to content

Commit

Permalink
feat: fix vtbackup binary by adding the flags it needs (vitessio#11417)
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <[email protected]>

Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 authored Oct 1, 2022
1 parent 3f73bdb commit c9f018b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions go/flags/endtoend/vtbackup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ Usage of vtbackup:
--azblob_backup_container_name string Azure Blob Container Name.
--azblob_backup_parallelism int Azure Blob operation parallelism (requires extra memory when increased). (default 1)
--azblob_backup_storage_root string Root prefix for all backup-related Azure Blobs; this should exclude both initial and trailing '/' (e.g. just 'a/b' not '/a/b/').
--backup_engine_implementation string Specifies which implementation to use for creating new backups (builtin or xtrabackup). Restores will always be done with whichever engine created a given backup. (default "builtin")
--backup_storage_block_size int if backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default is 250000). (default 250000)
--backup_storage_compress if set, the backup files will be compressed (default is true). Set to false for instance if a backup_storage_hook is specified and it compresses the data. (default true)
--backup_storage_hook string if set, we send the contents of the backup files through this hook.
--backup_storage_implementation string Which backup storage implementation to use for creating and restoring backups.
--backup_storage_number_blocks int if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, at once, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression. (default 2)
--ceph_backup_storage_config string Path to JSON config file for ceph backup storage. (default "ceph_backup_config.json")
--concurrency int (init restore parameter) how many concurrent files to restore at once (default 4)
--consul_auth_static_file string JSON File to read the topos/tokens from.
Expand Down Expand Up @@ -153,3 +158,11 @@ Usage of vtbackup:
-v, --v Level log level for V logs
--version print binary version
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
--xbstream_restore_flags string flags to pass to xbstream command during restore. These should be space separated and will be added to the end of the command. These need to match the ones used for backup e.g. --compress / --decompress, --encrypt / --decrypt
--xtrabackup_backup_flags string flags to pass to backup command. These should be space separated and will be added to the end of the command
--xtrabackup_prepare_flags string flags to pass to prepare command. These should be space separated and will be added to the end of the command
--xtrabackup_root_path string directory location of the xtrabackup and xbstream executables, e.g., /usr/bin
--xtrabackup_stream_mode string which mode to use if streaming, valid values are tar and xbstream (default "tar")
--xtrabackup_stripe_block_size uint Size in bytes of each block that gets sent to a given stripe before rotating to the next stripe (default 102400)
--xtrabackup_stripes uint If greater than 0, use data striping across this many destination files to parallelize data transfer and decompression
--xtrabackup_user string User that xtrabackup will use to connect to the database server. This user must have all necessary privileges. For details, please refer to xtrabackup documentation.
2 changes: 1 addition & 1 deletion go/vt/mysqlctl/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ var (
)

func init() {
for _, cmd := range []string{"mysqlctl", "mysqlctld", "vtcombo", "vttablet", "vttestserver", "vtctld", "vtctldclient", "vtexplain"} {
for _, cmd := range []string{"mysqlctl", "mysqlctld", "vtcombo", "vttablet", "vttestserver", "vtbackup", "vtctld", "vtctldclient", "vtexplain"} {
servenv.OnParseFor(cmd, registerBackupFlags)
}
}
Expand Down
2 changes: 1 addition & 1 deletion go/vt/mysqlctl/backupengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ type BackupRestoreEngine interface {
var BackupRestoreEngineMap = make(map[string]BackupRestoreEngine)

func init() {
for _, cmd := range []string{"mysqlctl", "mysqlctld", "vtcombo", "vttablet", "vttestserver", "vtctld", "vtctldclient", "vtexplain"} {
for _, cmd := range []string{"mysqlctl", "mysqlctld", "vtcombo", "vttablet", "vttestserver", "vtctld", "vtctldclient", "vtexplain", "vtbackup"} {
servenv.OnParseFor(cmd, registerBackupEngineFlags)
}
}
Expand Down
2 changes: 1 addition & 1 deletion go/vt/mysqlctl/xtrabackupengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ type xtraBackupManifest struct {
}

func init() {
for _, cmd := range []string{"mysqlctl", "mysqlctld", "vtcombo", "vttablet", "vttestserver", "vtctld", "vtctldclient", "vtexplain"} {
for _, cmd := range []string{"mysqlctl", "mysqlctld", "vtcombo", "vttablet", "vtbackup", "vttestserver", "vtctld", "vtctldclient", "vtexplain"} {
servenv.OnParseFor(cmd, registerXtraBackupEngineFlags)
}
}
Expand Down

0 comments on commit c9f018b

Please sign in to comment.