vttablet

A VTTablet server controls a running MySQL server. VTTablet supports two primary types of deployments:

  • Managed MySQL (most common)
  • External MySQL

In addition to these deployment types, a partially managed VTTablet is also possible by setting -disable_active_reparents.

Example Usage #

Managed MySQL #

In this mode, Vitess actively manages MySQL:

export TOPOLOGY_FLAGS="-topo_implementation etcd2 -topo_global_server_address localhost:2379 -topo_global_root /vitess/global"
export VTDATAROOT="/tmp"

vttablet \
$TOPOLOGY_FLAGS
-tablet-path $alias
-init_keyspace $keyspace
-init_shard $shard
-init_tablet_type $tablet_type
-port $port
-grpc_port $grpc_port
-service_map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream'

$alias needs to be of the form: <cell>-id, and the cell should match one of the local cells that was created in the topology. The id can be left padded with zeroes: cell-100 and cell-000000100 are synonymous.

External MySQL #

In this mode, an external MySQL can be used such as AWS RDS, AWS Aurora, Google CloudSQL; or just an existing (vanilla) MySQL installation.

See Unmanaged Tablet for the full guide.

Even if a MySQL is external, you can still make vttablet perform some management functions. They are as follows:

  • -disable_active_reparents: If this flag is set, then any reparent or replica commands will not be allowed. These are InitShardPrimary, PlannedReparentShard, EmergencyReparentShard, and ReparentTablet. In this mode, you should use the TabletExternallyReparented command to inform vitess of the current primary.
  • -replication_connect_retry: This value is give to mysql when it connects a replica to the primary as the retry duration parameter.
  • -enable_replication_reporter: If this flag is set, then vttablet will transmit replica lag related information to the vtgates, which will allow it to balance load better. Additionally, enabling this will also cause vttablet to restart replication if it was stopped. However, it will do this only if -disable_active_reparents was not turned on.
  • -enable_semi_sync: This option will automatically enable semi-sync on new replicas as well as on any tablet that transitions into a replica type. This includes the demotion of a primary to a replica.
  • -heartbeat_enable and -heartbeat interval duration: cause vttablet to write heartbeats to the sidecar database. This information is also used by the replication reporter to assess replica lag.

Options #

The following global options apply to vttablet:

NameTypeDefinition
-alsologtostderrbooleanLog to standard error as well as files
-app_idle_timeoutdurationIdle timeout for app connections (default 1m0s)
-app_pool_sizeintSize of the connection pool for app connections (default 40)
-azblob_backup_account_key_filestringPath to a file containing the Azure Storage account key; if this flag is unset, the environment variable VT_AZBLOB_ACCOUNT_KEY will be used as the key itself (NOT a file path)
-azblob_backup_account_namestringAzure Storage Account name for backups; if this flag is unset, the environment variable VT_AZBLOB_ACCOUNT_NAME will be used
-azblob_backup_container_namestringAzure Blob Container Name
-azblob_backup_parallelismintAzure Blob operation parallelism (requires extra memory when increased) (default 1)
-azblob_backup_storage_rootstringRoot prefix for all backup-related Azure Blobs; this should exclude both initial and trailing '/' (e.g. just 'a/b' not '/a/b/')
-backup_engine_implementationstringSpecifies 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_sizeintIf backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default 250000)
-backup_storage_compressbooleanIf set, the backup files will be compressed. Set to false for instance if a backup_storage_hook is specified and it compresses the data (default true)
-backup_storage_hookstringIf set, sends the contents of the backup files through this hook
-backup_storage_implementationstringWhich implementation to use for the backup storage feature
-backup_storage_number_blocksintIf 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. It should be equal to the number of CPUs available for compression (default 2)
-binlog_hoststringPITR restore parameter: hostname/IP of binlog server
-binlog_passwordstringPITR restore parameter: password of binlog server
-binlog_player_grpc_castringThe server CA to use to validate servers when connecting
-binlog_player_grpc_certstringThe cert to use to connect
-binlog_player_grpc_crlstringThe server crl to use to validate server certificates when connecting
-binlog_player_grpc_keystringThe key to use to connect
-binlog_player_grpc_server_namestringThe server name to use to validate server certificate
-binlog_player_protocolstringThe protocol to download binlogs from a vttablet (default "grpc")
-binlog_portintPITR restore parameter: port of binlog server
-binlog_ssl_castringPITR restore parameter: Filename containing TLS CA certificate to verify binlog server TLS certificate against
-binlog_ssl_certstringPITR restore parameter: Filename containing mTLS client certificate to present to binlog server as authentication
-binlog_ssl_keystringPITR restore parameter: Filename containing mTLS client private key for use in binlog server authentication
-binlog_ssl_server_namestringPITR restore parameter: TLS server name (common name) to verify against for the binlog server we are connecting to (If not set: use the hostname or IP supplied in -binlog_host)
-binlog_use_v3_resharding_modebooleanTrue if the binlog streamer should use V3-style sharding, which doesn't require a preset sharding key column (default true)
-binlog_userstringPITR restore parameter: username of binlog server.
-builtinbackup_mysqld_timeoutdurationHow long to wait for MySQL to shutdown at the start of the backup (default 10m0s)
-builtinbackup_progressdurationHow often to send progress updates when backing up large files (default 5s)
-catch-sigpipebooleanCatch and ignore SIGPIPE on stdout and stderr if specified
-ceph_backup_storage_configstringPath to JSON config file for ceph backup storage (default "ceph_backup_config.json")
-client-found-rows-pool-sizeintDeprecated: queryserver-config-transaction-cap will be used instead
-consul_auth_static_filestringJSON File to read the topos/tokens from.
-cpu_profilestringDeprecated: use '-pprof=cpu' instead
-datadog-agent-hoststringHost to send spans to; if empty, no tracing will be done
-datadog-agent-portstringPort to send spans to; if empty, no tracing will be done
-db-config-allprivs-charsetstringDeprecated: use db_charset (default "utf8mb4")
-db-config-allprivs-flagsuintDeprecated: use db_flags
-db-config-allprivs-flavorstringDeprecated: use db_flavor
-db-config-allprivs-hoststringDeprecated: use db_host
-db-config-allprivs-passstringDeprecated: use db_allprivs_password
-db-config-allprivs-portintDeprecated: use db_port
-db-config-allprivs-server_namestringDeprecated: use db_server_name
-db-config-allprivs-ssl-castringDeprecated: use db_ssl_ca
-db-config-allprivs-ssl-ca-pathstringDeprecated: use db_ssl_ca_path
-db-config-allprivs-ssl-certstringDeprecated: use db_ssl_cert
-db-config-allprivs-ssl-keystringDeprecated: use db_ssl_key
-db-config-allprivs-unamestringDeprecated: use db_allprivs_user (default "vt_allprivs")
-db-config-allprivs-unixsocketstringDeprecated: use db_socket
-db-config-app-charsetstringDeprecated: use db_charset (default "utf8mb4")
-db-config-app-flagsuintDeprecated: use db_flags
-db-config-app-flavorstringDeprecated: use db_flavor
-db-config-app-hoststringDeprecated: use db_host
-db-config-app-passstringDeprecated: use db_app_password
-db-config-app-portintDeprecated: use db_port
-db-config-app-server_namestringDeprecated: use db_server_name
-db-config-app-ssl-castringDeprecated: use db_ssl_ca
-db-config-app-ssl-ca-pathstringDeprecated: use db_ssl_ca_path
-db-config-app-ssl-certstringDeprecated: use db_ssl_cert
-db-config-app-ssl-keystringDeprecated: use db_ssl_key
-db-config-app-unamestringDeprecated: use db_app_user (default "vt_app")
-db-config-app-unixsocketstringDeprecated: use db_socket
-db-config-appdebug-charsetstringDeprecated: use db_charset (default "utf8mb4")
-db-config-appdebug-flagsuintDeprecated: use db_flags
-db-config-appdebug-flavorstringDeprecated: use db_flavor
-db-config-appdebug-hoststringDeprecated: use db_host
-db-config-appdebug-passstringDeprecated: use db_appdebug_password
-db-config-appdebug-portintDeprecated: use db_port
-db-config-appdebug-server_namestringDeprecated: use db_server_name
-db-config-appdebug-ssl-castringDeprecated: use db_ssl_ca
-db-config-appdebug-ssl-ca-pathstringDeprecated: use db_ssl_ca_path
-db-config-appdebug-ssl-certstringDeprecated: use db_ssl_cert
-db-config-appdebug-ssl-keystringDeprecated: use db_ssl_key
-db-config-appdebug-unamestringDeprecated: use db_appdebug_user (default "vt_appdebug")
-db-config-appdebug-unixsocketstringDeprecated: use db_socket
-db-config-dba-charsetstringDeprecated: use db_charset (default "utf8mb4")
-db-config-dba-flagsuintDeprecated: use db_flags
-db-config-dba-flavorstringDeprecated: use db_flavor
-db-config-dba-hoststringDeprecated: use db_host
-db-config-dba-passstringDeprecated: use db_dba_password
-db-config-dba-portintDeprecated: use db_port
-db-config-dba-server_namestringDeprecated: use db_server_name
-db-config-dba-ssl-castringDeprecated: use db_ssl_ca
-db-config-dba-ssl-ca-pathstringDeprecated: use db_ssl_ca_path
-db-config-dba-ssl-certstringDeprecated: use db_ssl_cert
-db-config-dba-ssl-keystringDeprecated: use db_ssl_key
-db-config-dba-unamestringDeprecated: use db_dba_user (default "vt_dba")
-db-config-dba-unixsocketstringDeprecated: use db_socket
-db-config-erepl-charsetstringDeprecated: use db_charset (default "utf8mb4")
-db-config-erepl-dbnamestringDeprecated: dbname does not need to be explicitly configured
-db-config-erepl-flagsuintDeprecated: use db_flags
-db-config-erepl-flavorstringDeprecated: use db_flavor
-db-config-erepl-hoststringDeprecated: use db_host
-db-config-erepl-passstringDeprecated: use db_erepl_password
-db-config-erepl-portintDeprecated: use db_port
-db-config-erepl-server_namestringDeprecated: use db_server_name
-db-config-erepl-ssl-castringDeprecated: use db_ssl_ca
-db-config-erepl-ssl-ca-pathstringDeprecated: use db_ssl_ca_path
-db-config-erepl-ssl-certstringDeprecated: use db_ssl_cert
-db-config-erepl-ssl-keystringDeprecated: use db_ssl_key
-db-config-erepl-unamestringDeprecated: use db_erepl_user (default "vt_erepl")
-db-config-erepl-unixsocketstringDeprecated: use db_socket
-db-config-filtered-charsetstringDeprecated: use db_charset (default "utf8mb4")
-db-config-filtered-flagsuintDeprecated: use db_flags
-db-config-filtered-flavorstringDeprecated: use db_flavor
-db-config-filtered-hoststringDeprecated: use db_host
-db-config-filtered-passstringDeprecated: use db_filtered_password
-db-config-filtered-portintDeprecated: use db_port
-db-config-filtered-server_namestringDeprecated: use db_server_name
-db-config-filtered-ssl-castringDeprecated: use db_ssl_ca
-db-config-filtered-ssl-ca-pathstringDeprecated: use db_ssl_ca_path
-db-config-filtered-ssl-certstringDeprecated: use db_ssl_cert
-db-config-filtered-ssl-keystringDeprecated: use db_ssl_key
-db-config-filtered-unamestringDeprecated: use db_filtered_user (default "vt_filtered")
-db-config-filtered-unixsocketstringDeprecated: use db_socket
-db-config-repl-charsetstringDeprecated: use db_charset (default "utf8mb4")
-db-config-repl-flagsuintDeprecated: use db_flags
-db-config-repl-flavorstringDeprecated: use db_flavor
-db-config-repl-hoststringDeprecated: use db_host
-db-config-repl-passstringDeprecated: use db_repl_password
-db-config-repl-portintDeprecated: use db_port
-db-config-repl-server_namestringDeprecated: use db_server_name
-db-config-repl-ssl-castringDeprecated: use db_ssl_ca
-db-config-repl-ssl-ca-pathstringDeprecated: use db_ssl_ca_path
-db-config-repl-ssl-certstringDeprecated: use db_ssl_cert
-db-config-repl-ssl-keystringDeprecated: use db_ssl_key
-db-config-repl-unamestringDeprecated: use db_repl_user (default "vt_repl")
-db-config-repl-unixsocketstringDeprecated: use db_socket
-db-credentials-filestringdb credentials file; send SIGHUP to reload this file
-db-credentials-serverstringdb credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file")
-db-credentials-vault-addrstringURL to Vault server
-db-credentials-vault-pathstringVault path to credentials JSON blob, e.g.: secret/data/prod/dbcreds
-db-credentials-vault-role-mountpointstringVault AppRole mountpoint; can also be passed using VAULT_MOUNTPOINT environment variable (default "approle")
-db-credentials-vault-role-secretidfilestringPath to file containing Vault AppRole secret_id; can also be passed using VAULT_SECRETID environment variable
-db-credentials-vault-roleidstringVault AppRole id; can also be passed using VAULT_ROLEID environment variable
-db-credentials-vault-timeoutdurationTimeout for vault API operations (default 10s)
-db-credentials-vault-tls-castringPath to CA PEM for validating Vault server certificate
-db-credentials-vault-tokenfilestringPath to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable
-db-credentials-vault-ttldurationHow long to cache DB credentials from the Vault server (default 30m0s)
-db_allprivs_passwordstringdb allprivs password
-db_allprivs_use_sslbooleanSet this flag to false to make the allprivs connection not use SSL (default true)
-db_allprivs_userstringdb allprivs user userKey (default "vt_allprivs")
-db_app_passwordstringdb app password
-db_app_use_sslbooleanSet this flag to false to make the app connection not use SSL (default true)
-db_app_userstringdb app user userKey (default "vt_app")
-db_appdebug_passwordstringdb appdebug password
-db_appdebug_use_sslbooleanSet this flag to false to make the appdebug connection not use SSL (default true)
-db_appdebug_userstringdb appdebug user userKey (default "vt_appdebug")
-db_charsetstringCharacter set used for this tablet (default "utf8mb4")
-db_connect_timeout_msintConnection timeout to mysqld in milliseconds (0 for no timeout)
-db_dba_passwordstringdb dba password
-db_dba_use_sslbooleanSet this flag to false to make the dba connection not use SSL (default true)
-db_dba_userstringdb dba user userKey (default "vt_dba")
-db_erepl_passwordstringdb erepl password
-db_erepl_use_sslbooleanSet this flag to false to make the erepl connection not use SSL (default true)
-db_erepl_userstringdb erepl user userKey (default "vt_erepl")
-db_filtered_passwordstringdb filtered password
-db_filtered_use_sslbooleanSet this flag to false to make the filtered connection not use SSL (default true)
-db_filtered_userstringdb filtered user userKey (default "vt_filtered")
-db_flagsuintFlag values as defined by MySQL.
-db_flavorstringFlavor override. Valid value is FilePos
-db_hoststringThe host name for the tcp connection
-db_portinttcp port
-db_repl_passwordstringdb repl password
-db_repl_use_sslbooleanSet this flag to false to make the repl connection not use SSL (default true)
-db_repl_userstringdb repl user userKey (default "vt_repl")
-db_server_namestringServer name of the DB we are connecting to
-db_socketstringThe unix socket to connect on. If this is specified, host and port will not be used
-db_ssl_castringConnection SSL CA
-db_ssl_ca_pathstringConnection SSL CA path
-db_ssl_certstringConnection SSL certificate
-db_ssl_keystringConnection SSL key
-db_ssl_modevalueSSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity
-db_tls_min_versionstringConfigures the minimal TLS version negotiated when SSL is enabled. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3 (Defaults to TLSv1.2)
-dba_idle_timeoutdurationIdle timeout for dba connections (default 1m0s)
-dba_pool_sizeintSize of the connection pool for dba connections (default 20)
-degraded_thresholddurationReplication lag after which a replica is considered degraded (default 30s)
-disable_active_reparentsbooleanIf set, do not allow active reparents. Use this to protect a cluster using external reparents
-discovery_high_replication_lag_minimum_servingdurationThe replication lag considered too high when applying the min_number_serving_vttablets threshold (default 2h0m0s)
-discovery_low_replication_lagdurationThe replication lag considered low enough to be healthy (default 30s)
-emit_statsbooleanIf set, emit stats to push-based monitoring and stats backends
-enable-autocommitbooleanThis flag is deprecated. Autocommit is always allowed (default true)
-enable-consolidatorbooleanSynonym to -enable_consolidator (default true)
-enable-consolidator-replicasbooleanSynonym to -enable_consolidator_replicas
-enable-lag-throttlerbooleanSynonym to -enable_lag_throttler
-enable-query-plan-field-cachingbooleanSynonym to -enable_query_plan_field_caching (default true)
-enable-tx-throttlerbooleanSynonym to -enable_tx_throttler
-enable_consolidatorbooleanThis option enables the query consolidator (default true)
-enable_consolidator_replicasbooleanThis option enables the query consolidator only on replicas
-enable_hot_row_protectionbooleanIf true, incoming transactions for the same row (range) will be queued and cannot consume all txpool slots
-enable_hot_row_protection_dry_runbooleanIf true, hot row protection is not enforced but logs if transactions would have been queued
-enable_lag_throttlerbooleanIf true, vttablet will run a throttler service, and will implicitly enable heartbeats
-enable_query_plan_field_cachingbooleanThis option fetches & caches fields (columns) when storing query plans (default true)
-enable_replication_reporterbooleanUse polling to track replication lag
-enable_semi_syncbooleanEnable semi-sync when configuring replication, on primary and replica tablets only (rdonly tablets will not ack)
-enable_transaction_limitbooleanIf true, limit on number of transactions open at the same time will be enforced for all users. User trying to open a new transaction after exhausting their limit will receive an error immediately, regardless of whether there are available slots or not
-enable_transaction_limit_dry_runbooleanIf true, limit on number of transactions open at the same time will be tracked for all users, but not enforced
-enable_tx_throttlerbooleanIf true replication-lag-based throttling on transactions will be enabled
-enforce-tableacl-configbooleanIf this flag is true, vttablet will fail to start if a valid tableacl config does not exist
-enforce_strict_trans_tablesbooleanIf true, vttablet requires MySQL to run with STRICT_TRANS_TABLES or STRICT_ALL_TABLES on. It is recommended to not turn this flag off. Otherwise MySQL may alter your supplied values before saving them to the database (default true)
-file_backup_storage_rootstringRoot directory for the file backup storage
-filecustomrulesstringFile based custom rule path
-filecustomrules_watchbooleanSet up a watch on the target file and reload query rules when it changes
-gc_check_intervaldurationInterval between garbage collection checks (default 1h0m0s)
-gc_purge_check_intervaldurationInterval between purge discovery checks (default 1m0s)
-gcs_backup_storage_bucketstringGoogle Cloud Storage bucket to use for backups
-gcs_backup_storage_rootstringRoot prefix for all backup-related object names
-gh-ost-pathstringOverride default gh-ost binary full path
-grpc_auth_modestringWhich auth plugin implementation to use (eg: static)
-grpc_auth_mtls_allowed_substringsstringList of substrings of at least one of the client certificate names (separated by colon)
-grpc_auth_static_client_credsstringWhen using grpc_static_auth in the server, this file provides the credentials to use to authenticate with server
-grpc_auth_static_password_filestringJSON File to read the users/passwords from
-grpc_castringServer CA to use for gRPC connections, requires TLS, and enforces client certificate check
-grpc_certstringServer certificate to use for gRPC connections, requires grpc_key, enables TLS
-grpc_compressionstringWhich protocol to use for compressing gRPC. Supported: snappy (Default: nothing)
-grpc_crlstringPath to a certificate revocation list in PEM format, client certificates will be further verified against this file during TLS handshake
-grpc_enable_optional_tlsbooleanEnable optional TLS mode when a server accepts both TLS and plain-text connections on the same port
-grpc_enable_tracingbooleanEnable GRPC tracing
-grpc_initial_conn_window_sizeintgRPC initial connection window size
-grpc_initial_window_sizeintgRPC initial window size
-grpc_keepalive_timedurationAfter a duration of this time, if the client doesn't see any activity, it pings the server to see if the transport is still alive (default 10s)
-grpc_keepalive_timeoutdurationAfter having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. (default 10s)
-grpc_keystringServer private key to use for gRPC connections, requires grpc_cert, enables TLS
-grpc_max_connection_agedurationMaximum age of a client connection before GoAway is sent (default 2562047h47m16.854775807s)
-grpc_max_connection_age_gracedurationAdditional grace period after grpc_max_connection_age, after which connections are forcibly closed (default 2562047h47m16.854775807s)
-grpc_max_message_sizeintMaximum allowed RPC message size. Larger messages will be rejected by gRPC with the error 'exceeding the max size' (default 16777216)
-grpc_portintPort to listen on for gRPC calls
-grpc_prometheusbooleanEnable gRPC monitoring with Prometheus
-grpc_server_castringpath to server CA in PEM format, which will be combine with server cert, return full certificate chain to clients
-grpc_server_initial_conn_window_sizeintgRPC server initial connection window size
-grpc_server_initial_window_sizeintgRPC server initial window size
-grpc_server_keepalive_enforcement_policy_min_timedurationgRPC server minimum keepalive time (default 10s)
-grpc_server_keepalive_enforcement_policy_permit_without_streambooleangRPC server permit client keepalive pings even when there are no active streams (RPCs)
-health_check_intervaldurationInterval between health checks (default 20s)
-heartbeat_enablebooleanIf true, vttablet records (if primary) or checks (if replica) the current time of a replication heartbeat in the table _vt.heartbeat. The result is used to inform the serving state of the vttablet via healthchecks.
-heartbeat_intervaldurationHow frequently to read and write replication heartbeat. (default 1s)
-hot_row_protection_concurrent_transactionsintNumber of concurrent transactions let through to the txpool/MySQL for the same hot row. Should be > 1 to have enough 'ready' transactions in MySQL and benefit from a pipelining effect (default 5)
-hot_row_protection_max_global_queue_sizeintGlobal queue limit across all row (ranges). Useful to prevent that the queue can grow unbounded (default 1000)
-hot_row_protection_max_queue_sizeintMaximum number of BeginExecute RPCs which will be queued for the same row (range) (default 20)
-init_db_name_overridestring(init parameter) Override the name of the db used by vttablet. Without this flag, the db name defaults to vt_
-init_keyspacestring(init parameter) Keyspace to use for this tablet
-init_populate_metadataboolean(init parameter) Populate metadata tables even if restore_from_backup is disabled. If restore_from_backup is enabled, metadata tables are always populated regardless of this flag
-init_shardstring(init parameter) Shard to use for this tablet
-init_tablet_typestring(init parameter) The tablet type to use for this tablet
-init_tagsvalue(init parameter) Comma separated list of key:value pairs used to tag the tablet
-init_timeoutduration(init parameter) Timeout to use for the init phase (default 1m0s)
-jaeger-agent-hoststringHost and port to send spans to; if empty, no tracing will be done
-keep_logsdurationKeep logs for this long (using ctime) (zero to keep forever)
-keep_logs_by_mtimedurationKeep logs for this long (using mtime) (zero to keep forever)
-keyspaces_to_watchvalueSpecifies which keyspaces this vtgate should have access to while routing queries or accessing the vschema
-lameduck-perioddurationKeep running at least this long after SIGTERM before stopping (default 50ms)
-legacy_replication_lag_algorithmbooleanUse the legacy algorithm when selecting the vttablets for serving (default true)
-lock_tables_timeoutdurationHow long to keep the table locked before timing out (default 1m0s)
-log_backtrace_atvalueWhen logging hits line file:N, emit a stack trace
-log_dirstringIf non-empty, write log files in this directory
-log_err_stacksbooleanLog stack traces for errors
-log_queriesbooleanEnable query logging to syslog.
-log_queries_to_filestringEnable query logging to the specified file
-log_rotate_max_sizeuintSize in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
-logtostderrbooleanLog to standard error instead of files
-master_connect_retrydurationDeprecated, use -replication_connect_retry (default 10s)
-mem-profile-rateintDeprecated: use '-pprof=mem' instead (default 524288)
-migration_check_intervaldurationInterval between migration checks (default 1m0s)
-min_number_serving_vttabletsintThe minimum number of vttablets for each replicating tablet_type (e.g. replica, rdonly) that will be continue to be used even with replication lag above discovery_low_replication_lag, but still below discovery_high_replication_lag_minimum_serving (default 2)
-mutex-profile-fractionintDeprecated: use '-pprof=mutex' instead
-mycnf-filestringPath to my.cnf, if reading all config params from there
-mycnf_bin_log_pathstringMySQL binlog path
-mycnf_data_dirstringData directory for mysql
-mycnf_error_log_pathstringMySQL error log path
-mycnf_general_log_pathstringMySQL general log path
-mycnf_innodb_data_home_dirstringInnodb data home directory
-mycnf_innodb_log_group_home_dirstringInnodb log group home directory
-mycnf_master_info_filestringMySQL master.info file
-mycnf_mysql_portintPort MySQL is listening on
-mycnf_pid_filestringMySQL pid file
-mycnf_relay_log_index_pathstringMySQL relay log index path
-mycnf_relay_log_info_pathstringMySQL relay log info path
-mycnf_relay_log_pathstringMySQL relay log path
-mycnf_secure_file_privstringMySQL path for loading secure files
-mycnf_server_idintMySQL server id of the server (if specified, mycnf-file will be ignored)
-mycnf_slow_log_pathstringMySQL slow query log path
-mycnf_socket_filestringMySQL socket file
-mycnf_tmp_dirstringMySQL tmp directory
-mysql_auth_server_static_filestringJSON File to read the users/passwords from
-mysql_auth_server_static_stringstringJSON representation of the users/passwords config
-mysql_auth_static_reload_intervaldurationTicker to reload credentials
-mysql_clientcert_auth_methodstringClient-side authentication method to use. Supported values: mysql_clear_password, dialog (default "mysql_clear_password")
-mysql_server_flush_delaydurationDelay after which buffered response will be flushed to the client (default 100ms)
-mysql_server_versionstringMySQL server version to advertise.
-mysqlctl_client_protocolstringThe protocol to use to talk to the mysqlctl server (default "grpc")
-mysqlctl_mycnf_templatestringTemplate file to use for generating the my.cnf file during server init
-mysqlctl_socketstringSocket file to use for remote mysqlctl actions (empty for local actions)
-onclose_timeoutdurationWait no more than this for OnClose handlers before stopping (default 1ns)
-onterm_timeoutdurationWait no more than this for OnTermSync handlers before stopping (default 10s)
-opentsdb_uristringURI of opentsdb /api/put method
-orc_api_passwordstring(Optional) Basic auth password to authenticate with Orchestrator's HTTP API
-orc_api_urlstringAddress of Orchestrator's HTTP API (e.g. http://host:port/api/). Leave empty to disable Orchestrator integration
-orc_api_userstring(Optional) Basic auth username to authenticate with Orchestrator's HTTP API. Leave empty to disable basic auth
-orc_discover_intervaldurationHow often to ping Orchestrator's HTTP API endpoint to tell it we exist. 0 means never
-orc_timeoutdurationTimeout for calls to Orchestrator's HTTP API (default 30s)
-pid_filestringIf set, the process will write its pid to the named file, and delete it on graceful shutdown
-pitr_gtid_lookup_timeoutdurationPITR restore parameter: timeout for fetching gtid from timestamp (default 1m0s)
-pool-name-prefixstringDeprecated
-pool_hostname_resolve_intervaldurationIf set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled)
-portintPort for the server
-pprofstringEnable profiling
-pt-osc-pathstringOverride default pt-online-schema-change binary full path
-publish_retry_intervaldurationHow long vttablet waits to retry publishing the tablet record (default 30s)
-purge_logs_intervaldurationHow often try to remove old logs (default 1h0m0s)
-query-log-stream-handlerstringURL handler for streaming queries log (default "/debug/querylog")
-querylog-filter-tagstringString that must be present in the query for it to be logged; if using a value as the tag, you need to disable query normalization
-querylog-formatstringFormat for query logs ("text" or "json") (default "text")
-querylog-row-thresholduintNumber of rows a query has to return or affect before being logged; not useful for streaming queries. 0 means all queries will be logged
-queryserver-config-acl-exempt-aclstringAn acl that exempt from table acl checking (this acl is free to access any vitess tables).
-queryserver-config-allowunsafe-dmlsbooleanDeprecated
-queryserver-config-annotate-queriesbooleanPrefix queries to MySQL backend with comment indicating vtgate principal (user) and target tablet type
-queryserver-config-enable-table-acl-dry-runbooleanIf this flag is enabled, tabletserver will emit monitoring metrics and let the request pass regardless of table acl check results
-queryserver-config-idle-timeoutfloatQuery server idle timeout (in seconds), vttablet manages various mysql connection pools. This config means if a connection has not been used in given idle timeout, this connection will be removed from pool. This effectively manages number of connection objects and optimize the pool performance (default 1800)
-queryserver-config-max-dml-rowsintQuery server max dml rows per statement, maximum number of rows allowed to return at a time for an update or delete with either 1) an equality where clauses on primary keys, or 2) a subselect statement. For update and delete statements in above two categories, vttablet will split the original query into multiple small queries based on this configuration value
-queryserver-config-max-result-sizeintQuery server max result size, maximum number of rows allowed to return from vttablet for non-streaming queries (default 10000)
-queryserver-config-message-conn-pool-prefill-parallelismintDeprecated: Unused
-queryserver-config-message-conn-pool-sizeintDeprecated
-queryserver-config-message-postpone-capintQuery server message postpone cap is the maximum number of messages that can be postponed at any given time. Set this number to substantially lower than transaction cap, so that the transaction pool isn't exhausted by the message subsystem (default 4)
-queryserver-config-passthrough-dmlsbooleanQuery server pass through all dml statements without rewriting
-queryserver-config-pool-prefill-parallelismintQuery server read pool pre-fill parallelism, a non-zero value will pre-fill the pool using the specified parallism
-queryserver-config-pool-sizeintQuery server read pool size, connection pool is used by regular queries (non streaming, not in a transaction) (default 16)
-queryserver-config-query-cache-lfubooleanQuery server cache algorithm. When set to true, a new cache algorithm based on a TinyLFU admission policy will be used to improve cache behavior and prevent pollution from sparse queries (default true)
-queryserver-config-query-cache-memoryintQuery server query cache size in bytes, maximum amount of memory to be used for caching. vttablet analyzes every incoming query and generate a query plan, these plans are being cached in a lru cache. This config controls the capacity of the lru cache (default 33554432)
-queryserver-config-query-cache-sizeintQuery server query cache size, maximum number of queries to be cached. vttablet analyzes every incoming query and generate a query plan, these plans are being cached in a lru cache. This config controls the capacity of the lru cache (default 5000)
-queryserver-config-query-pool-timeoutfloatQuery server query pool timeout (in seconds), is how long vttablet waits for a connection from the query pool. If set to 0 (default) then the overall query timeout is used instead
-queryserver-config-query-pool-waiter-capintQuery server query pool waiter limit, this is the maximum number of queries that can be queued waiting to get a connection (default 5000)
-queryserver-config-query-timeoutfloatQuery server query timeout (in seconds), this is the query timeout in vttablet side. If a query takes more than this timeout, it will be killed (default 30)
-queryserver-config-schema-change-signalbooleanQuery server schema signal, will signal connected vtgates that schema has changed whenever this is detected. VTGates will need to have -schema_change_signal enabled for this to work
-queryserver-config-schema-change-signal-intervalfloatQuery server schema change signal interval defines at which interval the query server shall send schema updates to vtgate (default 5)
-queryserver-config-schema-reload-timefloatQuery server schema reload time, how often vttablet reloads schemas from underlying MySQL instance in seconds. vttablet keeps table schemas in its own memory and periodically refreshes it from MySQL. This config controls the reload time (default 1800)
-queryserver-config-stream-buffer-sizeintQuery server stream buffer size, the maximum number of bytes sent from vttablet for each stream call. It's recommended to keep this value in sync with vtgate's stream_buffer_size (default 32768)
-queryserver-config-stream-pool-prefill-parallelismintQuery server stream pool pre-fill parallelism, a non-zero value will pre-fill the pool using the specified parallelism
-queryserver-config-stream-pool-sizeintQuery server stream connection pool size, stream pool is used by stream queries: queries that return results to client in a streaming fashion (default 200)
-queryserver-config-stream-pool-timeoutfloatQuery server stream pool timeout (in seconds), is how long vttablet waits for a connection from the stream pool. If set to 0 (default) then there is no timeout
-queryserver-config-stream-pool-waiter-capintQuery server stream pool waiter limit, is the maximum number of streaming queries that can be queued waiting to get a connection
-queryserver-config-strict-table-aclbooleanOnly allow queries that pass table acl checks
-queryserver-config-terse-errorsbooleanPrevent bind vars from escaping in client error messages
-queryserver-config-transaction-capintQuery server transaction cap is the maximum number of transactions allowed to happen at any given point of a time for a single vttablet. E.g. by setting transaction cap to 100, at most 100 transactions will be processed by a vttablet and the 101th transaction will be blocked (and fail if it cannot get connection within specified timeout) (default 20)
-queryserver-config-transaction-prefill-parallelismintQuery server transaction pre-fill parallelism, a non-zero value will pre-fill the pool using the specified parallism
-queryserver-config-transaction-timeoutfloatQuery server transaction timeout (in seconds), a transaction will be killed if it takes longer than this value (default 30)
-queryserver-config-txpool-timeoutfloatQuery server transaction pool timeout, is how long vttablet waits if tx pool is full (default 1)
-queryserver-config-txpool-waiter-capintQuery server transaction pool waiter limit, this is the maximum number of transactions that can be queued waiting to get a connection (default 5000)
-queryserver-config-warn-result-sizeintQuery server result size warning threshold, warn if number of rows returned from vttablet for non-streaming queries exceeds this
-queryserver_enable_online_ddlbooleanEnable online DDL. (default true)
-redact-debug-ui-queriesbooleanRedact full queries and bind variables from debug UI
-relay_log_max_itemsintMaximum number of rows for VReplication target buffering (default 5000)
-relay_log_max_sizeintMaximum buffer size (in bytes) for VReplication target buffering. If single rows are larger than this, a single row is buffered at a time (default 250000)
-remote_operation_timeoutdurationTime to wait for a remote operation (default 30s)
-replication_connect_retrydurationHow long to wait in between replica reconnect attempts. Only precise to the second (default 10s)
-restore_concurrencyint(init restore parameter) How many concurrent files to restore at once (default 4)
-restore_from_backupboolean(init restore parameter) Will check BackupStorage for a recent backup at startup and start there
-restore_from_backup_tsstring(init restore parameter) If set, restore the latest backup taken at or before this timestamp. Example: '2021-04-29.133050'
-retain_online_ddl_tablesdurationHow long should vttablet keep an old migrated table before purging it (default 24h0m0s)
-s3_backup_aws_endpointstringEndpoint of the S3 backend (region must be provided)
-s3_backup_aws_regionstringAWS region to use (default "us-east-1")
-s3_backup_aws_retriesintAWS request retries (default -1)
-s3_backup_force_path_stylebooleanForce the S3 path style
-s3_backup_log_levelstringDetermine the S3 loglevel to use from LogOff, LogDebug, LogDebugWithSigning, LogDebugWithHTTPBody, LogDebugWithRequestRetries, LogDebugWithRequestErrors (default "LogOff")
-s3_backup_server_side_encryptionstringServer-side encryption algorithm (e.g., AES256, aws:kms, sse_c:/path/to/key/file)
-s3_backup_storage_bucketstringS3 bucket to use for backups
-s3_backup_storage_rootstringRoot prefix for all backup-related object names
-s3_backup_tls_skip_verify_certbooleanSkip the 'certificate is valid' check for SSL connections
-sanitize_log_messagesboolRemove potentially sensitive information in tablet INFO, WARNING, and ERROR log messages such as query parameters
-security_policystringThe name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
-service_mapvalueComma separated list of services to enable (or disable if prefixed with '-') Example: grpc-vtworker
-serving_state_grace_perioddurationHow long to pause after broadcasting health to vtgate, before enforcing a new serving state
-shard_sync_retry_delaydurationDelay between retries of updates to keep the tablet and its shard record in sync (default 30s)
-shutdown_grace_periodfloatHow long to wait (in seconds) for queries and transactions to complete during graceful shutdown
-sql-max-length-errorsintTruncate queries in error logs to the given length (default unlimited)
-sql-max-length-uiintTruncate queries in debug UIs to the given length (default 512)
-srv_topo_cache_refreshdurationHow frequently to refresh the topology for cached entries (default 1s)
-srv_topo_cache_ttldurationHow long to use cached entries for topology (default 1s)
-srv_topo_timeoutdurationTopo server timeout (default 5s)
-stats_backendstringThe name of the registered push-based monitoring/stats backend uses
-stats_combine_dimensionsstringList of dimensions to be combined into a single "all" value in exported stats vars
-stats_common_tagsstringComma-separated list of common tags for the stats backend. It provides both label and values. Example: label1:value1,label2:value2
-stats_drop_variablesstringVariables to be dropped from the list of exported variables.
-stats_emit_perioddurationInterval between emitting stats to all registered backends (default 1m0s)
-statsd_addressstringAddress for statsd client
-statsd_sample_ratefloat(default 1)
-stderrthresholdvalueLogs at or above this threshold go to stderr (default 1)
-stream_health_buffer_sizeuintMax streaming health entries to buffer per streaming health client (default 20)
-table-acl-configstringPath to table access checker config file; send SIGHUP to reload this file
-table-acl-config-reload-intervaldurationTicker to reload ACLs. Duration flag, format e.g.: 30s. (Default: do not reload)
-table_gc_lifecyclestringStates for a DROP TABLE garbage collection cycle. Default is 'hold,purge,evac,drop', use any subset ('drop' implcitly always included) (default "hold,purge,evac,drop")
-tablet-pathstringTablet alias
-tablet_configstringYAML file config for tablet
-tablet_dirstringThe directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid
-tablet_filtersvalueSpecifies a comma-separated list of 'keyspace
-tablet_grpc_castringThe server CA to use to validate servers when connecting
-tablet_grpc_certstringThe cert to use to connect
-tablet_grpc_crlstringThe server crl to use to validate server certificates when connecting
-tablet_grpc_keystringThe key to use to connect
-tablet_grpc_server_namestringThe server name to use to validate server certificate
-tablet_hostnamestringIf not empty, this hostname will be assumed instead of trying to resolve it
-tablet_manager_grpc_castringThe server CA to use to validate servers when connecting
-tablet_manager_grpc_certstringThe cert to use to connect
-tablet_manager_grpc_concurrencyintConcurrency to use to talk to a vttablet server for performance-sensitive RPCs (like ExecuteFetchAs{Dba,AllPrivs,App}) (default 8)
-tablet_manager_grpc_connpool_sizeintNumber of tablets to keep tmclient connections open to (default 100)
-tablet_manager_grpc_crlstringThe server crl to use to validate server certificates when connecting
-tablet_manager_grpc_keystringThe key to use to connect
-tablet_manager_grpc_server_namestringThe server name to use to validate server certificate
-tablet_manager_protocolstringThe protocol to use to talk to vttablet (default "grpc")
-tablet_protocolstringHow to talk to the vttablets (default "grpc")
-tablet_refresh_intervaldurationTablet refresh interval (default 1m0s)
-tablet_refresh_known_tabletsbooleanTablet refresh reloads the tablet address/port map from topo in case it changes (default true)
-tablet_url_templatestringFormat string describing debug tablet url formatting. See the Go code for getTabletDebugURL() how to customize this (default "http://{{.GetTabletHostPort}}")
-throttle_check_as_check_selfbooleanShould throttler/check return a throttler/check-self result (changes throttler behavior for writes)
-throttle_metrics_querySELECTOverride default heartbeat/lag metric. Use either SELECT (must return single row, single value) or SHOW GLOBAL ... LIKE ... queries. Set -throttle_metrics_threshold respectively
-throttle_metrics_thresholdfloatOverride default throttle threshold, respective to -throttle_metrics_query (default 1.7976931348623157e+308)
-throttle_tablet_typesstringComma separated VTTablet types to be considered by the throttler. example: 'replica,rdonly'. 'replica' aways implicitly included (default "replica")
-throttle_thresholddurationReplication lag threshold for default lag throttling (default 1s)
-topo_consul_lock_delaydurationLockDelay for consul session (default 15s)
-topo_consul_lock_session_checksstringList of checks for consul session (default "serfHealth")
-topo_consul_lock_session_ttlstringTTL for consul session.
-topo_consul_watch_poll_durationdurationTime of the long poll for watch queries. (default 30s)
-topo_etcd_lease_ttlintLease TTL for locks and leader election. The client will use KeepAlive to keep the lease going (default 30)
-topo_etcd_tls_castringPath to the CA to use to validate the server cert when connecting to the etcd topo server
-topo_etcd_tls_certstringPath to the client cert to use to connect to the etcd topo server, requires topo_etcd_tls_key, enables TLS
-topo_etcd_tls_keystringPath to the client key to use to connect to the etcd topo server, enables TLS
-topo_global_rootstringPath of the global topology data in the global topology server
-topo_global_server_addressstringAddress of the global topology server
-topo_implementationstringTopology implementation to use
-topo_k8s_contextstringThe kubeconfig context to use, overrides the 'current-context' from the config
-topo_k8s_kubeconfigstringPath to a valid kubeconfig file. When running as a k8s pod inside the same cluster you wish to use as the topo, you may omit this and the below arguments, and Vitess is capable of auto-discovering the correct values. https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod
-topo_k8s_namespacestringThe kubernetes namespace to use for all objects. Default comes from the context or in-cluster config
-topo_read_concurrencyintConcurrent topo reads (default 32)
-topo_zk_auth_filestringAuth to use when connecting to the zk topo server, file contents should be :, e.g., digest:user:pass
-topo_zk_base_timeoutdurationzk base timeout (see zk.Connect) (default 30s)
-topo_zk_max_concurrencyintMaximum number of pending requests to send to a Zookeeper server. (default 64)
-topo_zk_tls_castringThe server CA to use to validate servers when connecting to the zk topo server
-topo_zk_tls_certstringThe cert to use to connect to the zk topo server, requires topo_zk_tls_key, enables TLS
-topo_zk_tls_keystringThe key to use to connect to the zk topo server, enables TLS
-topocustomrule_cellstringTopo cell for customrules file. (default "global")
-topocustomrule_pathstringPath for customrules file. Disabled if empty
-tracerstringTracing service to use (default "noop")
-tracing-enable-loggingbooleanWhether to enable logging in the tracing service
-tracing-sampling-ratevalueSampling rate for the probabilistic jaeger sampler (default 0.1)
-tracing-sampling-typevalueSampling strategy to use for jaeger. Possible values are 'const', 'probabilistic', 'rateLimiting', or 'remote' (default const)
-track_schema_versionsbooleanWhen enabled, vttablet will store versions of schemas at each position that a DDL is applied and allow retrieval of the schema corresponding to a position
-transaction-log-stream-handlerstringURL handler for streaming transactions log (default "/debug/txlog")
-transaction_limit_by_componentbooleanInclude CallerID.component when considering who the user is for the purpose of transaction limit
-transaction_limit_by_principalbooleanInclude CallerID.principal when considering who the user is for the purpose of transaction limit (default true)
-transaction_limit_by_subcomponentbooleanInclude CallerID.subcomponent when considering who the user is for the purpose of transaction limit
-transaction_limit_by_usernamebooleanInclude VTGateCallerID.username when considering who the user is for the purpose of transaction limit (default true)
-transaction_limit_per_userfloatMaximum number of transactions a single user is allowed to use at any time, represented as fraction of -transaction_cap (default 0.4)
-transaction_shutdown_grace_periodfloatDeprecated: use shutdown_grace_period instead.
-twopc_abandon_agefloatTime in seconds. Any unresolved transaction older than this time will be sent to the coordinator to be resolved
-twopc_coordinator_addressstringAddress of the (VTGate) process(es) that will be used to notify of abandoned transactions
-twopc_enablebooleanIf the flag is on, 2pc is enabled. Other 2pc flags must be supplied
-tx-throttler-configstringSynonym to -tx_throttler_config (default "target_replication_lag_sec: 2\nmax_replication_lag_sec: 10\ninitial_rate: 100\nmax_increase: 1\nemergency_decrease: 0.5\nmin_duration_between_increases_sec: 40\nmax_duration_between_increases_sec: 62\nmin_duration_between_decreases_sec: 20\nspread_backlog_across_sec: 20\nage_bad_rate_after_sec: 180\nbad_rate_increase: 0.1\nmax_rate_approach_threshold: 0.9\n")
-tx-throttler-healthcheck-cellsvalueSynonym to -tx_throttler_healthcheck_cells
-tx_throttler_configstringThe configuration of the transaction throttler as a text formatted throttlerdata.Configuration protocol buffer message (default "target_replication_lag_sec: 2\nmax_replication_lag_sec: 10\ninitial_rate: 100\nmax_increase: 1\nemergency_decrease: 0.5\nmin_duration_between_increases_sec: 40\nmax_duration_between_increases_sec: 62\nmin_duration_between_decreases_sec: 20\nspread_backlog_across_sec: 20\nage_bad_rate_after_sec: 180\nbad_rate_increase: 0.1\nmax_rate_approach_threshold: 0.9\n")
-tx_throttler_healthcheck_cellsvalueA comma-separated list of cells. Only tabletservers running in these cells will be monitored for replication lag by the transaction throttler
-unhealthy_thresholddurationReplication lag after which a replica is considered unhealthy (default 2h0m0s)
-use_super_read_onlybooleanSet super_read_only flag when performing planned failover (default true)
-vvalueLog level for V logs
-versionbooleanPrint binary version
-vmodulevalueComma-separated list of pattern=N settings for file-filtered logging
-vreplication_copy_phase_durationdurationDuration for each copy phase loop before running the next catchup (default 1h0m0s)
-vreplication_experimental_flagsint(Bitmask) of experimental features in vreplication to enable (default 1)
-vreplication_healthcheck_retry_delaydurationhealthcheck retry delay (default 5s)
-vreplication_healthcheck_timeoutdurationhealthcheck retry delay (default 1m0s)
-vreplication_healthcheck_topology_refreshdurationRefresh interval for re-reading the topology (default 30s)
-vreplication_heartbeat_update_intervalintFrequency (in seconds, max 60) at which the time_updated column of a vreplication stream when idling (default 1)
-vreplication_replica_lag_tolerancedurationReplica lag threshold duration: once lag is below this we switch from copy phase to the replication (streaming) phase (default 1m0s)
-vreplication_retry_delaydurationDelay before retrying a failed binlog connection (default 5s)
-vreplication_store_compressed_gtidbooleanStore compressed gtids in the pos column of _vt.vreplication
-vreplication_tablet_typestringComma separated list of tablet types used as a source (default "PRIMARY,REPLICA")
-vstream_dynamic_packet_sizebooleanEnable dynamic packet sizing for VReplication. This will adjust the packet size during replication to improve performance (default true)
-vstream_packet_sizeintSuggested packet size for VReplication streamer. This is used only as a recommendation. The actual packet size may be more or less than this amount (default 250000)
-vtctld_addrstringAddress of a vtctld instance
-vtgate_protocolstringHow to talk to vtgate (default "grpc")
-vttablet_skip_buildinfo_tagsstringComma-separated list of buildinfo tags to skip from merging with -init_tags. Each tag is either an exact match or a regular expression of the form '/regexp/' (default "/.*/")
-wait_for_backup_intervalduration(init restore parameter) If this is greater than 0, instead of starting up empty when no backups are found, keep checking at this interval for a backup to appear
-watch_replication_streambooleanWhen enabled, vttablet will stream the MySQL replication stream from the local server, and use it to update schema when it sees a DDL.
-xbstream_restore_flagsstringFlags 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_flagsstringFlags to pass to backup command. These should be space separated and will be added to the end of the command
-xtrabackup_prepare_flagsstringFlags to pass to prepare command. These should be space separated and will be added to the end of the command
-xtrabackup_root_pathstringDirectory location of the xtrabackup and xbstream executables, e.g., /usr/bin
-xtrabackup_stream_modestringWhich mode to use if streaming, valid values are tar and xbstream (default "tar")
-xtrabackup_stripe_block_sizeuintSize in bytes of each block that gets sent to a given stripe before rotating to the next stripe (default 102400)
-xtrabackup_stripesuintIf greater than 0, use data striping across this many destination files to parallelize data transfer and decompression
-xtrabackup_userstringUser that xtrabackup will use to connect to the database server. This user must have all necessary privileges. For details, please refer to xtrabackup documentation

Key Options #

  • -restore_from_backup: The default value for this flag is false. If set to true, and the my.cnf file was successfully loaded, then vttablet can perform automatic restores as follows:

    • If started against a mysql instance that has no data files, it will search the list of backups for the latest one, and initiate a restore. After this, it will point the mysql to the current primary and wait for replication to catch up. Once replication is caught up to the specified tolerance limit, it will advertise itself as serving. This will cause the vtgates to add it to the list of healthy tablets to serve queries from.
    • If this flag is true, but my.cnf was not loaded, then vttablet will fatally exit with an error message.
    • You can additionally control the level of concurrency for a restore with the -restore_concurrency flag. This is typically useful in cloud environments to prevent the restore process from becoming a 'noisy' neighbor by consuming all available disk IOPS.