backup

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 28 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 CopyFile added in v0.13.0

func CopyFile(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) ClearStorage added in v0.13.0

func (b *Backup) ClearStorage(num int64) (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(scheduler bool) (err error)

New ...

func (*Backup) Restore

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

Restore ...

func (*Backup) RestoreFile added in v0.13.1

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

RestoreFile ...

func (*Backup) RestoreFromChunks added in v0.13.0

func (b *Backup) RestoreFromChunks()

func (*Backup) RollbackChanges added in v0.12.0

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

func (*Backup) SendFileToTelegram added in v0.13.0

func (b *Backup) SendFileToTelegram(params events.CommandSendFileToTelegram)

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