backup

package
v0.0.0-...-0a9f745 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug bool

Debug controls verbose logging

Functions

This section is empty.

Types

type Manager

type Manager struct {
	Synology storage.Storage
	S3       storage.Storage
	// contains filtered or unexported fields
}

Manager handles backup operations

func NewManager

func NewManager(cfg *config.Config, key []byte) (*Manager, error)

NewManager creates a new backup manager

func (*Manager) CleanupBackups

func (m *Manager) CleanupBackups(serviceName string) (map[string]int, error)

CleanupBackups removes old backups while keeping the most recent ones

func (*Manager) Close

func (m *Manager) Close() error

Close closes all connections

func (*Manager) CreateBackup

func (m *Manager) CreateBackup(serviceName string) error

CreateBackup creates a backup of the specified service

func (*Manager) GetConfig

func (m *Manager) GetConfig() *config.Config

GetConfig returns the current configuration

func (*Manager) GetServices

func (m *Manager) GetServices() map[string]config.Service

GetServices returns the configured services

func (*Manager) RestoreBackup

func (m *Manager) RestoreBackup(serviceName, backupName string) error

RestoreBackup restores a backup of the specified service

func (*Manager) ValidateDockerContainer

func (m *Manager) ValidateDockerContainer(containerName string) error

ValidateDockerContainer checks if a Docker container exists and is accessible

func (*Manager) ValidateSynologyConnection

func (m *Manager) ValidateSynologyConnection() error

ValidateSynologyConnection tests the connection to the Synology NAS

Jump to

Keyboard shortcuts

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