Documentation
¶
Index ¶
- Constants
- Variables
- func GetBinlogStartTimestamp(path string) (time.Time, error)
- func HandleBackupFetch(folder storage.Folder, targetBackupSelector internal.BackupSelector, ...)
- func HandleBackupPush(uploader *internal.Uploader, backupCmd *exec.Cmd, isPermanent bool)
- func HandleBinlogFetch(folder storage.Folder, backupName string, untilTS string)
- func HandleBinlogPush(uploader *internal.Uploader)
- func HandleBinlogReplay(folder storage.Folder, backupName string, untilTS string)
- func HandleCopyAll(fromConfigFile string, toConfigFile string)
- func HandleCopyBackup(fromConfigFile, toConfigFile, backupName, prefix string)
- func HandleDetailedBackupList(folder storage.Folder, pretty, json bool)
- func MarkBackup(uploader *internal.Uploader, backupName string, toPermanent bool)
- func WildcardInfo(from storage.Folder, to storage.Folder) ([]copy.InfoProvider, error)
- type BackupDetail
- type BinlogEventHeader
- type BinlogReader
- type GenericMetaFetcher
- type GenericMetaInteractor
- type GenericMetaSetter
- type LogsCache
- type StreamSentinelDto
Constants ¶
View Source
const BinlogCacheFileName = ".walg_mysql_binlogs_cache"
View Source
const BinlogEventHeaderSize = 13
View Source
const BinlogMagicLength = 4
View Source
const BinlogPath = "binlog_" + utility.VersionStr + "/"
View Source
const TimeMysqlFormat = "2006-01-02 15:04:05"
Variables ¶
View Source
var BinlogMagic = [...]byte{0xfe, 0x62, 0x69, 0x6e}
Functions ¶
func GetBinlogStartTimestamp ¶ added in v0.2.23
func HandleBackupFetch ¶ added in v0.2.23
func HandleBackupPush ¶ added in v0.2.14
func HandleBinlogFetch ¶ added in v0.2.14
func HandleBinlogPush ¶
func HandleBinlogReplay ¶ added in v0.2.23
func HandleCopyAll ¶ added in v0.2.23
HandleCopyBackup copy all backups from one storage to another
func HandleCopyBackup ¶ added in v0.2.23
func HandleCopyBackup(fromConfigFile, toConfigFile, backupName, prefix string)
HandleCopyBackup copy specific backups from one storage to another
func HandleDetailedBackupList ¶ added in v0.2.23
func MarkBackup ¶ added in v0.2.23
MarkBackup marks a backup as permanent or impermanent
func WildcardInfo ¶ added in v0.2.23
Types ¶
type BackupDetail ¶ added in v0.2.23
type BackupDetail struct { BackupName string `json:"backup_name"` ModifyTime time.Time `json:"modify_time"` BinLogStart string `json:"binlog_start"` BinLogEnd string `json:"binlog_end"` StartLocalTime time.Time `json:"start_local_time"` StopLocalTime time.Time `json:"stop_local_time"` // these fields were introduced recently in // https://github.com/wal-g/wal-g/pull/930 // so it is not guaranteed that sentinel contains them UncompressedSize int64 `json:"uncompressed_size,omitempty"` CompressedSize int64 `json:"compressed_size,omitempty"` Hostname string `json:"hostname,omitempty"` IsPermanent bool `json:"is_permanent"` UserData interface{} `json:"user_data,omitempty"` }
func NewBackupDetail ¶ added in v0.2.23
func NewBackupDetail(backupTime internal.BackupTime, sentinel StreamSentinelDto) BackupDetail
type BinlogEventHeader ¶ added in v0.2.23
type BinlogEventHeader struct { Timestamp uint32 TypeCode uint8 ServerID uint32 EventLength uint32 }
https://dev.mysql.com/doc/internals/en/event-structure.html First 4 fields are the same in all versions
func ParseEventHeader ¶ added in v0.2.23
func ParseEventHeader(buf []byte) (header BinlogEventHeader)
type BinlogReader ¶ added in v0.2.23
type BinlogReader struct {
// contains filtered or unexported fields
}
func NewBinlogReader ¶ added in v0.2.23
func (*BinlogReader) NeedAbort ¶ added in v0.2.23
func (bl *BinlogReader) NeedAbort() bool
type GenericMetaFetcher ¶ added in v0.2.23
type GenericMetaFetcher struct{}
func NewGenericMetaFetcher ¶ added in v0.2.23
func NewGenericMetaFetcher() GenericMetaFetcher
func (GenericMetaFetcher) Fetch ¶ added in v0.2.23
func (mf GenericMetaFetcher) Fetch(backupName string, backupFolder storage.Folder) (internal.GenericMetadata, error)
type GenericMetaInteractor ¶ added in v0.2.23
type GenericMetaInteractor struct { GenericMetaFetcher GenericMetaSetter }
func NewGenericMetaInteractor ¶ added in v0.2.23
func NewGenericMetaInteractor() GenericMetaInteractor
type GenericMetaSetter ¶ added in v0.2.23
type GenericMetaSetter struct{}
func NewGenericMetaSetter ¶ added in v0.2.23
func NewGenericMetaSetter() GenericMetaSetter
func (GenericMetaSetter) SetIsPermanent ¶ added in v0.2.23
func (GenericMetaSetter) SetUserData ¶ added in v0.2.23
func (ms GenericMetaSetter) SetUserData(backupName string, backupFolder storage.Folder, userData interface{}) error
type LogsCache ¶ added in v0.2.12
type LogsCache struct {
LastArchivedBinlog string `json:"LastArchivedBinlog"`
}
type StreamSentinelDto ¶
type StreamSentinelDto struct { BinLogStart string `json:"BinLogStart,omitempty"` BinLogEnd string `json:"BinLogEnd,omitempty"` StartLocalTime time.Time `json:"StartLocalTime,omitempty"` StopLocalTime time.Time `json:"StopLocalTime,omitempty"` UncompressedSize int64 `json:"UncompressedSize,omitempty"` CompressedSize int64 `json:"CompressedSize,omitempty"` Hostname string `json:"Hostname,omitempty"` IsPermanent bool `json:"IsPermanent,omitempty"` UserData interface{} `json:"UserData,omitempty"` }
func (*StreamSentinelDto) String ¶ added in v0.2.23
func (s *StreamSentinelDto) String() string
Click to show internal directories.
Click to hide internal directories.