backups

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBackupRoute

func AddBackupRoute(w http.ResponseWriter, req *http.Request)

func CheckRepository

func CheckRepository(repository, password string) error

CheckRepository verifies if a repository exists and is valid

func CreateBackupJob

func CreateBackupJob(config BackupConfig, crontab string)

CreateBackupJob creates a backup job configuration

func CreateForgetJob

func CreateForgetJob(config BackupConfig, crontab string)

func CreateRepository

func CreateRepository(repository, password string) error

CreateRepository initializes a new Restic repository

func CreateRestoreJob

func CreateRestoreJob(config RestoreConfig)

CreateRestoreJob creates a restore job configuration

func DeleteByTag

func DeleteByTag(repository string, password string, tag string) error

func DeleteRepository

func DeleteRepository(repository string) error

DeleteRepository removes a Restic repository

func EditBackupRoute

func EditBackupRoute(w http.ResponseWriter, req *http.Request)

func EditRepositoryPassword

func EditRepositoryPassword(repository, currentPassword, newPassword string) error

EditRepositoryPassword changes the password of an existing repository

func ExecRestic

func ExecRestic(args []string, env []string) (string, error)

ExecRestic executes a restic command with the given arguments and environment variables

func ForgetSnapshot

func ForgetSnapshot(repository, password, snapshot string) error

func ForgetSnapshotRoute

func ForgetSnapshotRoute(w http.ResponseWriter, req *http.Request)

func InitBackups

func InitBackups()

func ListDirectory

func ListDirectory(repository, password, snapshotID, path string) (string, error)

ListDirectory lists the contents of a directory in a specific snapshot

func ListDirectoryWithFilters

func ListDirectoryWithFilters(repository, password, snapshotID, path string, recursive bool, longFormat bool) (string, error)

ListDirectoryWithFilters lists directory contents with additional filters

func ListFoldersRoute

func ListFoldersRoute(w http.ResponseWriter, req *http.Request)

func ListRepos

func ListRepos(w http.ResponseWriter, req *http.Request)

func ListSnapshots

func ListSnapshots(repository, password string) (string, error)

ListSnapshots returns a list of all snapshots in the repository

func ListSnapshotsRoute

func ListSnapshotsRoute(w http.ResponseWriter, req *http.Request)

func ListSnapshotsRouteFromRepo

func ListSnapshotsRouteFromRepo(w http.ResponseWriter, req *http.Request)

func ListSnapshotsWithFilters

func ListSnapshotsWithFilters(repository, password string, tags []string, host string, path string) (string, error)

ListSnapshotsWithFilters returns a filtered list of snapshots

func RemoveBackupRoute

func RemoveBackupRoute(w http.ResponseWriter, req *http.Request)

func RestoreBackupRoute

func RestoreBackupRoute(w http.ResponseWriter, req *http.Request)

func SplitJSONObjects

func SplitJSONObjects(input string) string

SplitJSONObjects splits a string containing multiple JSON objects, respecting quotes

func StatsRepository

func StatsRepository(repository, password string) (string, error)

CheckRepository verifies if a repository exists and is valid

func StatsRepositorySubfolder

func StatsRepositorySubfolder(repository, password, snapshot, path string) (string, error)

CheckRepository verifies if a repository exists and is valid

func StatsRepositorySubfolderRoute

func StatsRepositorySubfolderRoute(w http.ResponseWriter, req *http.Request)

Types

type BackupConfig

type BackupConfig struct {
	Repository         string
	Password           string
	Source             string
	Name               string
	Tags               []string
	Exclude            []string
	Retention          string
	AutoStopContainers bool
}

type RestoreConfig

type RestoreConfig struct {
	Repository         string
	Password           string
	SnapshotID         string
	Target             string
	Name               string
	Include            []string
	OriginalSource     string
	AutoStopContainers bool
}

Jump to

Keyboard shortcuts

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