package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
CheckDDLJobByRules if one of rules returns true, the job in srcDDLJobs will be filtered.
CheckRestoreDBAndTable is used to check whether the restore dbs or tables have been backup.
DDLJobBlockListRule rule for filter ddl job with type in block list.
DefineBackupEBSFlags defines common flags for the backup command.
DefineBackupFlags defines common flags for the backup command.
DefineCommonFlags defines the flags common to all BRIE commands.
DefineDatabaseFlags defines the required --db flag for `db` subcommand.
DefineFilterFlags defines the --filter and --case-sensitive flags for `full` subcommand.
DefineRawBackupFlags defines common flags for the backup command.
DefineRawRestoreFlags defines common flags for the backup command.
DefineRestoreCommonFlags defines common flags for the restore command.
DefineRestoreFlags defines common flags for the restore tidb command.
DefineRestoreSnapshotFlags defines common flags for the backup command.
DefineStreamCommonFlags define common flags for `stream task`.
DefineStreamRestoreFlags defines for the restore log command.
DefineStreamStartFlags defines flags used for `stream start`.
DefineTableFlags defines the required --db and --table flags for `table` subcommand.
DefineTxnBackupFlags defines common flags for the backup command.
EstimateRangeSize estimates the total range count by file.
Exhaust drains all remaining errors in the channel, into a slice of errors.
FilterDDLJobByRules if one of rules returns true, the job in srcDDLJobs will be filtered.
FilterDDLJobs filters ddl jobs.
GetKeepalive get the keepalive info from the config.
GetStorage gets the storage backend from the config.
HiddenFlagsForStream temporary hidden flags that stream cmd not support.
IsStreamRestore checks the command is `restore point`.
KeepGcDisabled keeps GC disabled and return a function that used to gc enabled.
LogArguments prints origin command arguments.
NewMgr creates a new mgr at the given PD address.
ParseTLSTripleFromFlags parses the (ca, cert, key) triple from flags.
ParseTSString port from tidb setSnapshotTS.
PreCheckTableClusterIndex checks whether backup tables and existed tables have different cluster index options。.
PreCheckTableTiFlashReplica checks whether TiFlash replica is less than TiFlash node.
ReadBackupMeta reads the backupmeta file from the storage.
RunBackup starts a backup task inside the current goroutine.
RunBackupEBS starts a backup task to backup volume vai EBS snapshot.
RunBackupRaw starts a backup task inside the current goroutine.
RunBackupTxn starts a backup task inside the current goroutine.
RunResolveKvData starts a restore task inside the current goroutine.
RunRestore starts a restore task inside the current goroutine.
RunRestoreEBSMeta phase 1 of EBS based restore.
RunRestoreRaw starts a raw kv restore task inside the current goroutine.
RunRestoreTxn starts a txn kv restore task inside the current goroutine.
RunStreamCommand run all kinds of `stream task`.
RunStreamPause specifies pausing a stream task.
RunStreamRestore restores stream log.
RunStreamResume specifies resuming a stream task.
RunStreamStart specifies starting a stream task.
RunStreamStatus get status for a specific stream task.
RunStreamStop specifies stoping a stream task.
RunStreamTruncate truncates the log that belong to (0, until-ts).
ShiftTS gets a smaller shiftTS than startTS.
# Constants
FlagBatchFlushInterval controls after how long the restore batch would be auto sended.
FlagDdlBatchSize controls batch ddl size to create a batch of tables.
FlagKeyspaceName corresponds to tidb config keyspace-name.
FlagMergeRegionKeyCount is the flag name of merge small regions by key count.
FlagMergeRegionSizeBytes is the flag name of merge small regions by size.
FlagPDConcurrency controls concurrency pd-relative operations like split & scatter.
FlagPiTRBatchCount and FlagPiTRBatchSize are used for restore log with batch method.
FlagStatsConcurrency controls concurrency to restore statistic.
FlagStreamFullBackupStorage is used for log restore, represents the full backup storage.
FlagStreamStartTS and FlagStreamRestoreTS is used for log restore timestamp range.
FlagWaitTiFlashReady represents whether wait tiflash replica ready after table restored and checksumed.
FlagWithPlacementPolicy corresponds to tidb config with-tidb-placement-mode current only support STRICT or IGNORE, the default is STRICT according to tidb.
default type.
# Structs
BackupConfig is the configuration specific for backup tasks.
CompressionConfig is the configuration for sst file compression.
Config is the common configuration for all BRIE tasks.
RawKvConfig is the common config for rawkv backup and restore.
RestoreCommonConfig is the common configuration for all BR restore tasks.
RestoreConfig is the configuration specific for restore tasks.
RestoreRawConfig is the configuration specific for raw kv restore tasks.
StreamConfig specifies the configure about backup stream.
TLSConfig is the common configuration for TLS connection.
TxnKvConfig is the common config for txn kv backup and restore.