backup

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DataBackupDir = "/data_backup"
	MetaBackupDir = "/meta_backup"
	WalBackupDir  = "/wal_backup"
	FullBackupLog = "full_backup_log.json"
	IncBackupLog  = "inc_backup_log.json"
	MetaInfo      = "meta_info.json"
	BackupLogPath = "/backup_log"
	ResultLog     = "result"
	NodeMapInfo   = "node_map"

	IsInc            = "isInc"
	IsRemote         = "isRemote"
	IsNode           = "isNode"
	BackupPath       = "backupPath"
	OnlyBackupMaster = "onlyBackupMaster"
	BackupMeta       = "backupMeta"
	DataBases        = "dbs"
	MetaData         = "metaData"
)

Variables

This section is empty.

Functions

func FileCopy

func FileCopy(src, dst string) error

func FileMove

func FileMove(src, dst string) error

func FolderCopy

func FolderCopy(src, dst string) error

func FolderMove

func FolderMove(src, dst string) error

func ReadBackupLogFile

func ReadBackupLogFile(filePath string, backuplog interface{}) error

func WriteBackupLogFile

func WriteBackupLogFile(content []byte, path string, logName string) error

func WriteResultFile added in v1.5.1

func WriteResultFile(result *BackupResult, path string, logName string) error

Types

type BackupLogInfo

type BackupLogInfo struct {
	FullBackupTime int64                 `json:"fullBackupTime"`
	IncBackupTime  int64                 `json:"incBackupTime"`
	FileListMap    map[string][][]string `json:"orderFileListMap"`
}

type BackupResult added in v1.5.0

type BackupResult struct {
	Result    string              `json:"result"`
	Databases map[string]struct{} `json:"databases"`
	Time      int64               `json:"time"`
	DataDir   string              `json:"dataDir"`
	MetaDir   string              `json:"metaDir"`
	WalDir    string              `json:"walDir"`
}

type IncBackupLogInfo

type IncBackupLogInfo struct {
	AddFileListMap map[string][][]string `json:"addOrderFileListMap"`
	DelFileListMap map[string][][]string `json:"delOrderFileListMap"`
}

type NodeInfoMap added in v1.5.1

type NodeInfoMap struct {
	SrcNode uint64                           `json:"srcNode"`
	DstNode uint64                           `json:"dstNode"`
	DbMap   map[string]map[string]*RpInfoMap `json:"dbMap"`
	PtMap   map[string]map[string]string     `json:"ptMap"`
}

type RpInfoMap added in v1.5.1

type RpInfoMap struct {
	ShardMap map[string]string `json:"shardMap"`
	IndexMap map[string]string `json:"indexMap"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL