backup

package
v0.0.0-...-dcbe3c4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package backup provides backup log files to remote server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect2bos

func Connect2bos(remote, accessKey, accessSecret string) (c *bos.Client, err error)

func GenRsyncCMD

func GenRsyncCMD(fpath, remote string) (cmd []string)

func IsFileReadyToUpload

func IsFileReadyToUpload(regex, fname string, now time.Time) (ok bool, err error)

IsFileReadyToUpload Check is file ready to upload

func RunSysCMD

func RunSysCMD(cmd []string) (output string, err error)

func ScanFiles

func ScanFiles(dir, regex string) (files []string)

ScanFiles return absolute file pathes that match regex

Types

type BosArgs

type BosArgs struct {
	Remote       string // "https://gz.bcebos.com"
	Bucket       string
	AccessKey    string
	AccessSecret string
}

type Setting

type Setting struct {
	Name      string
	Path      string
	Regex     string
	IsReserve bool
	Mode      string
	Args      map[string]interface{}
}

func LoadSettings

func LoadSettings() (configs []*Setting)

Jump to

Keyboard shortcuts

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