Documentation
¶
Index ¶
- Variables
- func BackupConfigurationValidation()
- func BatchPostdataStatements(statements []toc.StatementWithType) ([]toc.StatementWithType, []toc.StatementWithType, []toc.StatementWithType)
- func CheckRowsRestored(rowsRestored int64, rowsBackedUp int64, tableName string) error
- func CopyTableIn(connectionPool *dbconn.DBConn, tableName string, tableAttributes string, ...) (int64, error)
- func CreateConnectionPool(unquotedDBName string)
- func CreateInitialSegmentPipes(oidList []string, c *cluster.Cluster, connectionPool *dbconn.DBConn, ...) int
- func DoCleanup(restoreFailed bool)
- func DoInit(cmd *cobra.Command)
- func DoRestore()
- func DoSetup()
- func DoTeardown()
- func DoValidation(cmd *cobra.Command)
- func ExecuteRestoreMetadataStatements(statements []toc.StatementWithType, objectsTitle string, ...) int32
- func ExecuteStatements(statements []toc.StatementWithType, progressBar utils.ProgressBar, ...) int32
- func ExecuteStatementsAndCreateProgressBar(statements []toc.StatementWithType, objectsTitle string, showProgressBar int, ...) int32
- func ExpandReplicatedTable(origSize int, tableName string, whichConn int) error
- func FindHistoricalPluginVersion(timestamp string) string
- func FlagChanged(flagName string) bool
- func GenerateRestoreRelationList(opts options.Options) []string
- func GetBackupFPInfoForTimestamp(timestamp string) filepath.FilePathInfo
- func GetBackupFPInfoListFromRestorePlan() []filepath.FilePathInfo
- func GetExistingSchemas() ([]string, error)
- func GetExistingTableFQNs() ([]string, error)
- func GetResizeClusterInfo() (int, int, bool)
- func GetRestoreMetadataStatements(section string, filename string, includeObjectTypes []string, ...) []toc.StatementWithType
- func GetRestoreMetadataStatementsFiltered(section string, filename string, includeObjectTypes []string, ...) []toc.StatementWithType
- func GetVersion() string
- func InitializeBackupConfig()
- func InitializeConnectionPool(backupTimestamp string, restoreTimestamp string, unquotedDBName string)
- func MustGetFlagBool(flagName string) bool
- func MustGetFlagInt(flagName string) int
- func MustGetFlagString(flagName string) string
- func MustGetFlagStringArray(flagName string) []string
- func MustGetFlagStringSlice(flagName string) []string
- func RecoverMetadataFilesUsingPlugin()
- func RedistributeTableData(tableName string, whichConn int) error
- func RestoreSchemas(schemaStatements []toc.StatementWithType, progressBar utils.ProgressBar)
- func SetBackupConfig(config *history.BackupConfig)
- func SetCluster(cluster *cluster.Cluster)
- func SetCmdFlags(flagSet *pflag.FlagSet)
- func SetConnection(conn *dbconn.DBConn)
- func SetFPInfo(fpInfo filepath.FilePathInfo)
- func SetLoggerVerbosity()
- func SetMaxCsvLineLengthQuery(connectionPool *dbconn.DBConn) string
- func SetPluginConfig(config *utils.PluginConfig)
- func SetRestorePlanForLegacyBackup(toc *toc.TOC, backupTimestamp string, backupConfig *history.BackupConfig)
- func SetTOC(toc *toc.TOC)
- func SetVersion(v string)
- func TruncateTable(tableFQN string, whichConn int) error
- func ValidateBackupFlagCombinations()
- func ValidateDatabaseExistence(unquotedDBName string, createDatabase bool, isFiltered bool)
- func ValidateExcludeRelationsInBackupSet(schemaList []string)
- func ValidateExcludeSchemasInBackupSet(schemaList []string)
- func ValidateFlagCombinations(flags *pflag.FlagSet)
- func ValidateIncludeRelationsInBackupSet(schemaList []string)
- func ValidateIncludeSchemasInBackupSet(schemaList []string)
- func ValidateRedirectSchema(connectionPool *dbconn.DBConn, redirectSchema string)
- func ValidateRelationsInRestoreDatabase(connectionPool *dbconn.DBConn, relationList []string)
- func ValidateSafeToResizeCluster()
- func VerifyBackupDirectoriesExistOnAllHosts()
- func VerifyBackupFileCountOnSegments()
- func VerifyMetadataFilePaths(withStats bool)
- type Empty
- type Filters
Constants ¶
This section is empty.
Variables ¶
var ( /* * Used for synchronizing DoCleanup. In DoInit() we increment the group * and then wait for at least one DoCleanup to finish, either in DoTeardown * or the signal handler. */ CleanupGroup *sync.WaitGroup )
Functions ¶
func BackupConfigurationValidation ¶
func BackupConfigurationValidation()
func BatchPostdataStatements ¶
func BatchPostdataStatements(statements []toc.StatementWithType) ([]toc.StatementWithType, []toc.StatementWithType, []toc.StatementWithType)
* There is an existing bug in Greenplum where creating indexes in parallel * on an AO table that didn't have any indexes previously can cause * deadlock. * * We work around this issue by restoring post data objects in * two batches. The first batch takes one index from each table and * restores them in parallel (which has no possibility of deadlock) and * then the second restores all other postdata objects in parallel. After * each table has at least one index, there is no more risk of deadlock. * * A third batch is created specifically for postdata metadata * (e.g. ALTER INDEX, ALTER EVENT TRIGGER, COMMENT ON). These * statements cannot be concurrently run with batch two since that * is where the dependent postdata objects are being created.
func CheckRowsRestored ¶
func CopyTableIn ¶
func CreateConnectionPool ¶
func CreateConnectionPool(unquotedDBName string)
func DoTeardown ¶
func DoTeardown()
func DoValidation ¶
* This function handles argument parsing and validation, e.g. checking that a passed filename exists. * It should only validate; initialization with any sort of side effects should go in DoInit or DoSetup.
func ExecuteRestoreMetadataStatements ¶
func ExecuteRestoreMetadataStatements(statements []toc.StatementWithType, objectsTitle string, progressBar utils.ProgressBar, showProgressBar int, executeInParallel bool) int32
func ExecuteStatements ¶
func ExecuteStatements(statements []toc.StatementWithType, progressBar utils.ProgressBar, executeInParallel bool, whichConn ...int) int32
* This function creates a worker pool of N goroutines to be able to execute up * to N statements in parallel.
func ExpandReplicatedTable ¶
func FlagChanged ¶
func GetBackupFPInfoForTimestamp ¶
func GetBackupFPInfoForTimestamp(timestamp string) filepath.FilePathInfo
func GetBackupFPInfoListFromRestorePlan ¶
func GetBackupFPInfoListFromRestorePlan() []filepath.FilePathInfo
func GetExistingSchemas ¶
func GetExistingTableFQNs ¶
func GetResizeClusterInfo ¶
func GetVersion ¶
func GetVersion() string
func InitializeBackupConfig ¶
func InitializeBackupConfig()
func MustGetFlagBool ¶
func MustGetFlagInt ¶
func MustGetFlagString ¶
func MustGetFlagStringArray ¶
func MustGetFlagStringSlice ¶
func RecoverMetadataFilesUsingPlugin ¶
func RecoverMetadataFilesUsingPlugin()
func RedistributeTableData ¶
func RestoreSchemas ¶
func RestoreSchemas(schemaStatements []toc.StatementWithType, progressBar utils.ProgressBar)
func SetBackupConfig ¶
func SetBackupConfig(config *history.BackupConfig)
func SetCluster ¶
func SetCmdFlags ¶
func SetConnection ¶
func SetFPInfo ¶
func SetFPInfo(fpInfo filepath.FilePathInfo)
func SetLoggerVerbosity ¶
func SetLoggerVerbosity()
func SetPluginConfig ¶
func SetPluginConfig(config *utils.PluginConfig)
func SetRestorePlanForLegacyBackup ¶
func SetRestorePlanForLegacyBackup(toc *toc.TOC, backupTimestamp string, backupConfig *history.BackupConfig)
func SetVersion ¶
func SetVersion(v string)
func TruncateTable ¶
func ValidateBackupFlagCombinations ¶
func ValidateBackupFlagCombinations()
func ValidateExcludeRelationsInBackupSet ¶
func ValidateExcludeRelationsInBackupSet(schemaList []string)
func ValidateExcludeSchemasInBackupSet ¶
func ValidateExcludeSchemasInBackupSet(schemaList []string)
func ValidateIncludeRelationsInBackupSet ¶
func ValidateIncludeRelationsInBackupSet(schemaList []string)
func ValidateIncludeSchemasInBackupSet ¶
func ValidateIncludeSchemasInBackupSet(schemaList []string)
func ValidateRedirectSchema ¶
func ValidateSafeToResizeCluster ¶
func ValidateSafeToResizeCluster()
func VerifyBackupDirectoriesExistOnAllHosts ¶
func VerifyBackupDirectoriesExistOnAllHosts()
func VerifyBackupFileCountOnSegments ¶
func VerifyBackupFileCountOnSegments()
func VerifyMetadataFilePaths ¶
func VerifyMetadataFilePaths(withStats bool)