Versions in this module Expand all Collapse all v1 v1.3.0 Jan 10, 2026 Changes in this version + const DefaultTimeout + const SecureDirMode + const SecureFileMode + const SnapshotIDPattern + const SnapshotSavedPattern + const TempPrefix + type Config struct + BackupType string + BackupUUID string + IgnorePatterns string + LocalPath string + Password string + S3Config *S3Config + ServerUUID string + Tags map[string]string + type LocalRepository struct + func NewLocalRepository(cfg Config) (*LocalRepository, error) + func (r *LocalRepository) Close() error + func (r *LocalRepository) CreateSnapshot(ctx context.Context, path string, tags map[string]string, ignoreFile string) (*Snapshot, error) + func (r *LocalRepository) DeleteSnapshot(ctx context.Context, id string) error + func (r *LocalRepository) Destroy(ctx context.Context) error + func (r *LocalRepository) Exists(ctx context.Context) (bool, error) + func (r *LocalRepository) GetRepositorySize(ctx context.Context) (int64, error) + func (r *LocalRepository) GetSnapshot(ctx context.Context, id string) (*Snapshot, error) + func (r *LocalRepository) GetSnapshotSizes(ctx context.Context) (map[string]int64, error) + func (r *LocalRepository) Info(ctx context.Context) (*RepositoryInfo, error) + func (r *LocalRepository) Initialize(ctx context.Context) error + func (r *LocalRepository) ListSnapshots(ctx context.Context, filter map[string]string) ([]*Snapshot, error) + func (r *LocalRepository) RestoreSnapshot(ctx context.Context, snapshotID string, targetPath string, sourcePath string) error + type Repository interface + Close func() error + CreateSnapshot func(ctx context.Context, path string, tags map[string]string, ignoreFile string) (*Snapshot, error) + DeleteSnapshot func(ctx context.Context, id string) error + Destroy func(ctx context.Context) error + Exists func(ctx context.Context) (bool, error) + GetRepositorySize func(ctx context.Context) (int64, error) + GetSnapshot func(ctx context.Context, id string) (*Snapshot, error) + GetSnapshotSizes func(ctx context.Context) (map[string]int64, error) + Info func(ctx context.Context) (*RepositoryInfo, error) + Initialize func(ctx context.Context) error + ListSnapshots func(ctx context.Context, filter map[string]string) ([]*Snapshot, error) + RestoreSnapshot func(ctx context.Context, snapshotID string, targetPath string, sourcePath string) error + type RepositoryInfo struct + LastUpdate time.Time + SnapshotCount int + TotalSize int64 type RusticBackup + func LocateRusticBackup(client remote.Client, cfg Config, snapshotID string) (*RusticBackup, error) + func LocateRusticBySnapshotID(client remote.Client, serverUuid string, snapshotID string, backupType string, ...) (*RusticBackup, error) + func NewRusticBackup(client remote.Client, cfg Config) (*RusticBackup, error) + func (b *RusticBackup) GetRepository() Repository + func (r *RusticBackup) Close() error + type S3Config struct + AccessKeyID string + Bucket string + Endpoint string + ForcePathStyle bool + Region string + SecretAccessKey string + SessionToken string + type S3Repository struct + func NewS3Repository(cfg Config) (*S3Repository, error) + func (r *S3Repository) Close() error + func (r *S3Repository) CreateSnapshot(ctx context.Context, path string, tags map[string]string, ignoreFile string) (*Snapshot, error) + func (r *S3Repository) DeleteSnapshot(ctx context.Context, id string) error + func (r *S3Repository) Destroy(ctx context.Context) error + func (r *S3Repository) Exists(ctx context.Context) (bool, error) + func (r *S3Repository) GetRepositorySize(ctx context.Context) (int64, error) + func (r *S3Repository) GetSnapshot(ctx context.Context, id string) (*Snapshot, error) + func (r *S3Repository) GetSnapshotSizes(ctx context.Context) (map[string]int64, error) + func (r *S3Repository) Info(ctx context.Context) (*RepositoryInfo, error) + func (r *S3Repository) Initialize(ctx context.Context) error + func (r *S3Repository) ListSnapshots(ctx context.Context, filter map[string]string) ([]*Snapshot, error) + func (r *S3Repository) RestoreSnapshot(ctx context.Context, snapshotID string, targetPath string, sourcePath string) error + type Snapshot struct + BackupUUID string + CreatedAt time.Time + ID string + Paths []string + Size int64 + Tags map[string]string + type SnapshotInfo struct + GID int + Hostname string + ID string + Paths []string + ProgramVersion string + Summary ... + Tags []string + Time time.Time + Tree string + UID int + Username string v1.1.0 Sep 25, 2025 Changes in this version + type AdapterType string + const LocalBackupAdapter + const RusticLocalAdapter + const RusticS3Adapter + const S3BackupAdapter + type ArchiveDetails struct + Checksum string + ChecksumType string + Parts []remote.BackupPart + Size int64 + SnapshotId string + func (ad *ArchiveDetails) ToRequest(successful bool) remote.BackupRequest + type Backup struct + Ignore string + Uuid string + func (b *Backup) Checksum() ([]byte, error) + func (b *Backup) Details(ctx context.Context, parts []remote.BackupPart) (*ArchiveDetails, error) + func (b *Backup) Identifier() string + func (b *Backup) Ignored() string + func (b *Backup) Path() string + func (b *Backup) SetClient(c remote.Client) + func (b *Backup) Size() (int64, error) + type BackupInterface interface + Checksum func() ([]byte, error) + Details func(context.Context, []remote.BackupPart) (*ArchiveDetails, error) + Generate func(context.Context, *filesystem.Filesystem, string) (*ArchiveDetails, error) + Identifier func() string + Ignored func() string + Path func() string + Remove func() error + Restore func(context.Context, io.Reader, RestoreCallback) error + SetClient func(remote.Client) + Size func() (int64, error) + WithLogContext func(map[string]interface{}) + type LocalBackup struct + func LocateLocal(client remote.Client, uuid string) (*LocalBackup, os.FileInfo, error) + func NewLocal(client remote.Client, uuid string, ignore string) *LocalBackup + func (b *LocalBackup) Generate(ctx context.Context, fsys *filesystem.Filesystem, ignore string) (*ArchiveDetails, error) + func (b *LocalBackup) Remove() error + func (b *LocalBackup) Restore(ctx context.Context, _ io.Reader, callback RestoreCallback) error + func (b *LocalBackup) WithLogContext(c map[string]interface{}) + type Reader struct + func (Reader) Close() error + type RestoreCallback func(file string, info fs.FileInfo, r io.ReadCloser) error + type RusticBackup struct + func LocateRustic(client remote.Client, uuid string, backupType string, ...) (*RusticBackup, error) + func LocateRusticLocal(client remote.Client, uuid string, password string) (*RusticBackup, error) + func LocateRusticS3(client remote.Client, uuid string, s3Creds *remote.S3Credentials, ...) (*RusticBackup, error) + func LocateRusticWithPath(client remote.Client, serverUuid string, backupUuid string, backupType string, ...) (*RusticBackup, error) + func NewRustic(client remote.Client, uuid string, ignore string, backupType string, ...) *RusticBackup + func NewRusticWithServerPath(client remote.Client, serverUuid string, backupUuid string, ignore string, ...) *RusticBackup + func (r *RusticBackup) CanDownload() bool + func (r *RusticBackup) Checksum() ([]byte, error) + func (r *RusticBackup) Details(ctx context.Context, parts []remote.BackupPart) (*ArchiveDetails, error) + func (r *RusticBackup) DownloadTarGz(ctx context.Context, writer io.Writer) error + func (r *RusticBackup) Generate(ctx context.Context, fsys *filesystem.Filesystem, ignore string) (*ArchiveDetails, error) + func (r *RusticBackup) Path() string + func (r *RusticBackup) Remove() error + func (r *RusticBackup) Restore(ctx context.Context, reader io.Reader, callback RestoreCallback) error + func (r *RusticBackup) SetClient(c remote.Client) + func (r *RusticBackup) Size() (int64, error) + func (r *RusticBackup) WithLogContext(c map[string]any) + type RusticGroupMetadata struct + Hostname string + Label string + Paths []string + type RusticRepoInfo struct + Index struct{ ... } + func (r *RusticRepoInfo) GetTotalDataSize() int64 + type RusticSnapshotGroup [2]any + type RusticSnapshotInfo struct + GID int + Hostname string + ID string + Original string + Paths []string + ProgramVersion string + Summary ... + Tags []string + Time time.Time + Tree string + UID int + Username string + type S3Backup struct + func NewS3(client remote.Client, uuid string, ignore string) *S3Backup + func (s *S3Backup) Generate(ctx context.Context, fsys *filesystem.Filesystem, ignore string) (*ArchiveDetails, error) + func (s *S3Backup) Remove() error + func (s *S3Backup) Restore(ctx context.Context, r io.Reader, callback RestoreCallback) error + func (s *S3Backup) WithLogContext(c map[string]interface{})