Documentation
¶
Overview ¶
Package backup provides database backup and restore utilities. Currently supports PostgreSQL (via pg_dump/psql) and MySQL (via mysqldump/mysql). Backups are compressed with gzip and can be stored on any storage.Disk.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BackupFile ¶
BackupFile describes a backup on disk.
type Config ¶
type Config struct {
Driver Driver
Host string
Port int
User string
Password string
DBName string
// BackupDir is where backup files are stored locally.
BackupDir string
Logger *slog.Logger
}
Config holds database connection info for the backup tool.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles backup and restore operations.
func (*Manager) List ¶
func (m *Manager) List() ([]BackupFile, error)
List returns all backup files in the backup directory, newest first.
Click to show internal directories.
Click to hide internal directories.