Skip to content

Switch flag definitions to be on pflag instead of flag in package go/cmd/vtbackup #11279

Closed
@ajm188

Description

@ajm188

Part of #10697.

Current flags:

$ git grep -E "\bflag\.[A-Z]" -- go/cmd/vtbackup/*.go
go/cmd/vtbackup/vtbackup.go:    _ = flag.Duration("timeout", 2*time.Hour, "DEPRECATED AND UNUSED")
go/cmd/vtbackup/vtbackup.go:    _ = flag.Duration("replication_timeout", 1*time.Hour, "DEPRECATED AND UNUSED")
go/cmd/vtbackup/vtbackup.go:    minBackupInterval = flag.Duration("min_backup_interval", 0, "Only take a new backup if it's been at least this long since the most recent backup.")
go/cmd/vtbackup/vtbackup.go:    minRetentionTime  = flag.Duration("min_retention_time", 0, "Keep each old backup for at least this long before removing it. Set to 0 to disable pruning of old backups.")
go/cmd/vtbackup/vtbackup.go:    minRetentionCount = flag.Int("min_retention_count", 1, "Always keep at least this many of the most recent backups in this backup storage location, even if some are older than the min_retention_time. This must be at least 1 since a backup must always exist to allow new backups to be made")
go/cmd/vtbackup/vtbackup.go:    initialBackup    = flag.Bool("initial_backup", false, "Instead of restoring from backup, initialize an empty database with the provided init_db_sql_file and upload a backup of that for the shard, if the shard has no backups yet. This can be used to seed a brand new shard with an initial, empty backup. If any backups already exist for the shard, this will be considered a successful no-op. This can only be done before the shard exists in topology (i.e. before any tablets are deployed).")
go/cmd/vtbackup/vtbackup.go:    allowFirstBackup = flag.Bool("allow_first_backup", false, "Allow this job to take the first backup of an existing shard.")
go/cmd/vtbackup/vtbackup.go:    restartBeforeBackup = flag.Bool("restart_before_backup", false, "Perform a mysqld clean/full restart after applying binlogs, but before taking the backup. Only makes sense to work around xtrabackup bugs.")
go/cmd/vtbackup/vtbackup.go:    initDbNameOverride = flag.String("init_db_name_override", "", "(init parameter) override the name of the db used by vttablet")
go/cmd/vtbackup/vtbackup.go:    initKeyspace       = flag.String("init_keyspace", "", "(init parameter) keyspace to use for this tablet")
go/cmd/vtbackup/vtbackup.go:    initShard          = flag.String("init_shard", "", "(init parameter) shard to use for this tablet")
go/cmd/vtbackup/vtbackup.go:    concurrency        = flag.Int("concurrency", 4, "(init restore parameter) how many concurrent files to restore at once")
go/cmd/vtbackup/vtbackup.go:    mysqlPort     = flag.Int("mysql_port", 3306, "mysql port")
go/cmd/vtbackup/vtbackup.go:    mysqlSocket   = flag.String("mysql_socket", "", "path to the mysql socket")
go/cmd/vtbackup/vtbackup.go:    mysqlTimeout  = flag.Duration("mysql_timeout", 5*time.Minute, "how long to wait for mysqld startup")
go/cmd/vtbackup/vtbackup.go:    initDBSQLFile = flag.String("init_db_sql_file", "", "path to .sql file to run after mysql_install_db")
go/cmd/vtbackup/vtbackup.go:    detachedMode  = flag.Bool("detach", false, "detached mode - run backups detached from the terminal")

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions