Documentation ¶
Index ¶
- Constants
- Variables
- func AllowedBackupTypesList() []string
- func CheckNewVersionAvailable(ver string) (string, string, error)
- func Contains(s []string, str string) bool
- func DirNormalize(path string) string
- func GetDateTimeNow(unit string) (res string)
- func GetDecadeDaySubdir() (decadeDay string)
- func GetFileFullPath(dirPath, baseName, baseExtension, prefix string, gZip bool) (fullPath string)
- func GetMessage(n logger.LogRecord, project, server string) (m string)
- func GetOfsPart(regex, target string) string
- func PathNormalize(path string) (string, error)
- func RandString(strLen int64) string
- type BackupType
Constants ¶
View Source
const ( YearlyBackupDay = "1" MonthlyBackupDay = "1" WeeklyBackupDay = "0" LatestVersionURL = "https://github.com/nixys/nxs-backup/releases/latest/download/nxs-backup" VersionURL = "https://github.com/nixys/nxs-backup/releases/download/v" DescFiles BackupType = "desc_files" IncFiles BackupType = "inc_files" Mysql BackupType = "mysql" MysqlXtrabackup BackupType = "mysql_xtrabackup" MariadbBackup BackupType = "mariadb_backup" Postgresql BackupType = "postgresql" PostgresqlBasebackup BackupType = "postgresql_basebackup" MongoDB BackupType = "mongodb" Redis BackupType = "redis" External BackupType = "external" )
Variables ¶
View Source
var ( ErrArg = errors.New("incorrect arguments") ErrArgSuccessExit = errors.New("arg success exit") ErrConfig = errors.New("config incorrect") ErrExecution = errors.New("execution finished with errors") )
View Source
var CPULimit = 0
View Source
var DecadesBackupDays = []string{"1", "11", "21"}
Functions ¶
func AllowedBackupTypesList ¶
func AllowedBackupTypesList() []string
func CheckNewVersionAvailable ¶
CheckNewVersionAvailable checks if new version is available
func DirNormalize ¶
DirNormalize normalizes the directory path
func GetDateTimeNow ¶
func GetDecadeDaySubdir ¶
func GetDecadeDaySubdir() (decadeDay string)
func GetFileFullPath ¶
func GetMessage ¶
GetMessage generates notification message from event log record
func GetOfsPart ¶
func PathNormalize ¶
PathNormalize normalizes the path
Types ¶
type BackupType ¶
type BackupType string
Click to show internal directories.
Click to hide internal directories.