backup

package
v1.0.0-next.6 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BackupCmd = &cobra.Command{
	Use:   "backup",
	Short: "Actions related to backups",
}
View Source
var BackupFullCmd = &cobra.Command{
	Use:   "full",
	Short: "Create a full backup of a zfs snapshot",
	RunE: func(cmd *cobra.Command, args []string) error {
		var backupUse domain.BackupUsecase
		c := shared.LoadDeps(shared.ConfigPath, shared.LogLevel)
		err := c.Resolve(&backupUse)
		if err != nil {
			return err
		}

		return backupUse.BackupFull(
			cmd.Context(),
			backupFullConf.Snapshot,
			false,
		)
	},
}
View Source
var BackupIncCmd = &cobra.Command{
	Use:   "incremental",
	Short: "Create a incremental backup of a zfs snapshot",
	RunE: func(cmd *cobra.Command, args []string) error {
		var backupUse domain.BackupUsecase
		c := shared.LoadDeps(shared.ConfigPath, shared.LogLevel)
		err := c.Resolve(&backupUse)
		if err != nil {
			return err
		}

		return backupUse.BackupIncremental(
			cmd.Context(),
			backupIncConf.SnapshotBase,
			backupIncConf.SnapshotNew,
			false,
		)
	},
}

Functions

This section is empty.

Types

type BackupFullConf

type BackupFullConf struct {
	Snapshot string
}

type BackupIncConf

type BackupIncConf struct {
	SnapshotNew  string
	SnapshotBase string
}

Jump to

Keyboard shortcuts

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