backup

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src string, dst string) error

Dir copies a whole directory recursively

func File

func File(src, dst string) error

File copies a single file from src to dst

Types

type Backup

type Backup struct {
	// contains filtered or unexported fields
}

Backup ...

func NewBackup

func NewBackup(lc fx.Lifecycle, eventBus bus.Bus, cfg *Config) *Backup

NewBackup ...

func (*Backup) ApplyChanges added in v0.12.0

func (b *Backup) ApplyChanges() (err error)

func (*Backup) Delete added in v0.12.0

func (b *Backup) Delete(name string) (err error)

Delete ...

func (*Backup) List

func (b *Backup) List(ctx context.Context, limit, offset int64, orderBy, s string) (list m.Backups, total int64, err error)

List ...

func (*Backup) New

func (b *Backup) New() (err error)

New ...

func (*Backup) Restore

func (b *Backup) Restore(name string) (err error)

Restore ...

func (*Backup) RollbackChanges added in v0.12.0

func (b *Backup) RollbackChanges() (err error)

func (*Backup) Shutdown added in v0.7.1

func (b *Backup) Shutdown(ctx context.Context) (err error)

Shutdown ...

func (*Backup) UploadBackup added in v0.12.0

func (b *Backup) UploadBackup(ctx context.Context, reader *bufio.Reader, fileName string) (newFile *m.Backup, err error)

UploadBackup ...

type Config added in v0.12.0

type Config struct {
	Path     string
	Name     string
	User     string
	Password string
	Host     string
	Port     string
}

Config ...

func (Config) String added in v0.12.0

func (c Config) String() string

String ...

type Local added in v0.12.0

type Local struct {
	// contains filtered or unexported fields
}

func NewLocal added in v0.12.0

func NewLocal(cfg *Config) *Local

func (*Local) New added in v0.12.0

func (l *Local) New(tmpDir string) (err error)

func (*Local) Restore added in v0.12.0

func (l *Local) Restore(path string) (err error)

Jump to

Keyboard shortcuts

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