Documentation
¶
Index ¶
Constants ¶
const ( RestoreModeAuto = "auto" RestoreModeASB = "asb" RestoreModeASBX = "asbx" )
const DefaultChunkSize = 5 * 1024 * 1024
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Help bool
Version bool
Verbose bool
// Set log level for verbose output.
LogLevel string
// Format logs as JSON, for parsing by external tools.
LogJSON bool
}
App contains the global application flags.
type AwsS3 ¶
type AwsS3 struct {
BucketName string
Region string
Profile string
Endpoint string
AccessKeyID string
SecretAccessKey string
StorageClass string
AccessTier string
RestorePollDuration int64
RetryMaxAttempts int
RetryMaxBackoffSeconds int
RetryBackoffSeconds int
ChunkSize int
}
AwsS3 represents the configuration for AWS S3 storage integration.
func (*AwsS3) LoadSecrets ¶
func (a *AwsS3) LoadSecrets(cfg *backup.SecretAgentConfig) error
LoadSecrets tries to load field values from secret agent.
type AzureBlob ¶
type AzureBlob struct {
// Account name + key auth
AccountName string
AccountKey string
// Azure Active directory
TenantID string
ClientID string
ClientSecret string
Endpoint string
ContainerName string
AccessTier string
RestorePollDuration int64
RetryMaxAttempts int
RetryTimeoutSeconds int
RetryDelaySeconds int
RetryMaxDelaySeconds int
BlockSize int
}
AzureBlob represents the configuration for Azure Blob storage integration.
func (*AzureBlob) LoadSecrets ¶
func (a *AzureBlob) LoadSecrets(cfg *backup.SecretAgentConfig) error
LoadSecrets tries to load field values from secret agent.
type Backup ¶
type Backup struct {
OutputFile string
RemoveFiles bool
ModifiedBefore string
ModifiedAfter string
FileLimit uint64
AfterDigest string
MaxRecords int64
NoBins bool
SleepBetweenRetries int
FilterExpression string
ParallelNodes bool
RemoveArtifacts bool
Compact bool
NodeList string
NoTTLOnly bool
PreferRacks string
PartitionList string
Estimate bool
EstimateSamples int64
StateFileDst string
Continue string
ScanPageSize int64
OutputFilePrefix string
RackList string
InfoMaxRetries uint
InfoRetriesMultiplier float64
InfoRetryIntervalMilliseconds int64
}
Backup flags that will be mapped to (scan) backup config. (common for backup and restore flags are in Common).
func (*Backup) ShouldClearTarget ¶
ShouldClearTarget check if we should clean target directory.
func (*Backup) ShouldSaveState ¶
type BackupXDR ¶
type BackupXDR struct {
Directory string
FileLimit uint64
RemoveFiles bool
ParallelWrite int
DC string
LocalAddress string
LocalPort int
Namespace string
Rewind string
MaxThroughput int
ReadTimeoutMilliseconds int64
WriteTimeoutMilliseconds int64
ResultQueueSize int
AckQueueSize int
MaxConnections int
InfoPolingPeriodMilliseconds int64
StartTimeoutMilliseconds int64
TLSConfig *tls.Config
StopXDR bool
UnblockMRT bool
InfoMaxRetries uint
InfoRetriesMultiplier float64
InfoRetryIntervalMilliseconds int64
Forward bool
}
BackupXDR flags that will be mapped to xdr backup config. (common for backup and restore flags are in Common).
type ClientPolicy ¶
ClientPolicy contains flags that will be mapped to ClientPolicy.
type Common ¶
type Common struct {
Directory string
Namespace string
SetList string
BinList string
Parallel int
NoRecords bool
NoIndexes bool
NoUDFs bool
RecordsPerSecond int
MaxRetries int
TotalTimeout int64
SocketTimeout int64
// Nice is mapped to config.Bandwidth
// Is set in MiB then converted to bytes.
Nice int
}
Common parameters are used by both backup and restore operations.
type Compression ¶
Compression contains flags that will be mapped to CompressionPolicy for backup and restore operations.
type Encryption ¶
Encryption contains flags that will be mapped to EncryptionPolicy for backup and restore operations.
type GcpStorage ¶
type GcpStorage struct {
// Path to file containing Service Account JSON Key.
KeyFile string
// For GPC storage bucket is not part of the path as in S3.
// So we should set it separately.
BucketName string
// Alternative url.
// It is not recommended to use an alternate URL in a production environment.
Endpoint string
RetryMaxAttempts int
RetryBackoffMaxSeconds int
RetryBackoffInitSeconds int
RetryBackoffMultiplier float64
ChunkSize int
}
GcpStorage represents the configuration for GCP storage integration.
func (*GcpStorage) LoadSecrets ¶
func (g *GcpStorage) LoadSecrets(cfg *backup.SecretAgentConfig) error
LoadSecrets tries to load field values from secret agent.
func (*GcpStorage) Validate ¶
func (g *GcpStorage) Validate() error
Validate internal validation for struct params.
type Restore ¶
type Restore struct {
InputFile string
DirectoryList string
ParentDirectory string
DisableBatchWrites bool
BatchSize int
MaxAsyncBatches int
// For optimal performance, should be at least MaxAsyncBatches.
// This is applicable only to batch writes.
WarmUp int
ExtraTTL int64
IgnoreRecordError bool
Uniq bool
Replace bool
NoGeneration bool
TimeOut int64
RetryBaseTimeout int64
RetryMultiplier float64
RetryMaxRetries uint
Mode string
ValidateOnly bool
}
Restore contains flags that will be mapped to restore config.