Documentation
¶
Index ¶
- func FindMydumperPath() string
- func FindMyloaderPath() string
- func FindMysqlPath() string
- func FindMysqldumpPath() string
- func FindRclonePath() string
- func GetActiveConfigPath() (string, error)
- func GetConfigPaths() []string
- type BackupConfig
- type CleanupConfig
- type CompressionConfig
- type Config
- type DatabaseConfig
- type LoggingConfig
- type MetricsConfig
- type MydumperConfig
- type MyloaderConfig
- type UploadConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindMydumperPath ¶ added in v1.1.5
func FindMydumperPath() string
func FindMyloaderPath ¶ added in v1.1.5
func FindMyloaderPath() string
func FindMysqlPath ¶ added in v1.1.5
func FindMysqlPath() string
func FindMysqldumpPath ¶ added in v1.1.5
func FindMysqldumpPath() string
Public functions for external access
func FindRclonePath ¶ added in v1.1.5
func FindRclonePath() string
func GetActiveConfigPath ¶ added in v1.1.2
GetActiveConfigPath returns the path of the config file that would be used
func GetConfigPaths ¶ added in v1.1.2
func GetConfigPaths() []string
GetConfigPaths returns the config paths for the current platform (for CLI help)
Types ¶
type BackupConfig ¶
type BackupConfig struct {
Directory string `mapstructure:"directory"`
Databases []string `mapstructure:"databases"`
BatchSize int `mapstructure:"batch_size"`
Concurrency int `mapstructure:"concurrency"`
Timeout time.Duration `mapstructure:"timeout"`
RetryCount int `mapstructure:"retry_count"`
RetryDelay time.Duration `mapstructure:"retry_delay"`
CheckLastBackupTime bool `mapstructure:"check_last_backup_time"`
MinBackupInterval time.Duration `mapstructure:"min_backup_interval"`
SkipConfirmation bool `mapstructure:"skip_confirmation"`
Compression CompressionConfig `mapstructure:"compression"`
}
type CleanupConfig ¶
type CleanupConfig struct {
Enabled bool `mapstructure:"enabled"`
CleanupUploadedFiles bool `mapstructure:"cleanup_uploaded_files"`
RemoteRetention int `mapstructure:"remote_retention_days"`
WeekendOnly bool `mapstructure:"weekend_only"`
AgeBasedCleanup bool `mapstructure:"age_based_cleanup"`
MaxAgeDays int `mapstructure:"max_age_days"`
VerifyCloudExists bool `mapstructure:"verify_cloud_exists"`
Databases []string `mapstructure:"databases"`
}
type CompressionConfig ¶ added in v1.1.4
type CompressionConfig struct {
Enabled bool `mapstructure:"enabled"`
Format string `mapstructure:"format"` // "tar.gz", "tar.zst", "tar.xz"
Level int `mapstructure:"level"` // 1-9 compression level
KeepOriginal bool `mapstructure:"keep_original"` // Keep uncompressed backup locally
CompressUpload bool `mapstructure:"compress_upload"` // Only compress for upload
}
CompressionConfig controls backup compression settings
type Config ¶
type Config struct {
Database DatabaseConfig `mapstructure:"database"`
Backup BackupConfig `mapstructure:"backup"`
Upload UploadConfig `mapstructure:"upload"`
Logging LoggingConfig `mapstructure:"logging"`
Cleanup CleanupConfig `mapstructure:"cleanup"`
Metrics MetricsConfig `mapstructure:"metrics"`
}
func LoadConfig ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Timeout int `mapstructure:"timeout"`
MysqldumpPath string `mapstructure:"mysqldump_path"`
MysqlPath string `mapstructure:"mysql_path"`
Mydumper *MydumperConfig `mapstructure:"mydumper"`
}
type LoggingConfig ¶
type MetricsConfig ¶
type MydumperConfig ¶
type MydumperConfig struct {
Enabled bool `mapstructure:"enabled"`
BinaryPath string `mapstructure:"binary_path"`
DefaultsFile string `mapstructure:"defaults_file"`
Threads int `mapstructure:"threads"`
ChunkFilesize int `mapstructure:"chunk_filesize"`
CompressMethod string `mapstructure:"compress_method"`
BuildEmptyFiles bool `mapstructure:"build_empty_files"`
UseDefer bool `mapstructure:"use_defer"`
SingleTable bool `mapstructure:"single_table"`
NoSchemas bool `mapstructure:"no_schemas"`
NoData bool `mapstructure:"no_data"`
Myloader *MyloaderConfig `mapstructure:"myloader"`
}
MydumperConfig supports cross-platform mydumper versions with automatic parameter detection Tested and supported versions:
- v0.9.1+ (Ubuntu 18.04, older Linux distributions)
- v0.10.0+ (most modern Linux distributions)
- v0.19.3+ (macOS Homebrew, latest versions)
The system automatically detects version and uses appropriate parameters for compatibility
type MyloaderConfig ¶
type UploadConfig ¶
type UploadConfig struct {
Enabled bool `mapstructure:"enabled"`
RclonePath string `mapstructure:"rclone_path"`
RcloneConfigPath string `mapstructure:"rclone_config_path"`
Destination string `mapstructure:"destination"`
Timeout int `mapstructure:"timeout"`
RetryCount int `mapstructure:"retry_count"`
}
Click to show internal directories.
Click to hide internal directories.