Added option to run local (rsync) or cloud (rclone) backups, in case you prefer a "full" copy with hardlinks via rsync, or latest/incremental snapshots via rclone

This commit is contained in:
2026-09-03 13:21:54 -04:00
parent fe6101a532
commit 0144cc2b4e
11 changed files with 1428 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
package cmd
import (
"fmt"
"git.metaunix.net/bitgoblin/goblin-store/lib/backup"
"git.metaunix.net/bitgoblin/goblin-store/lib/config"
"github.com/spf13/cobra"
)
var backupLocalCmd = &cobra.Command{
Use: "local",
Short: "Run local hardlinked snapshot backup (via Rsync)",
RunE: func(cmd *cobra.Command, args []string) error {
cfg, err := config.Load()
if err != nil {
return fmt.Errorf("configuration error: %w", err)
}
return backup.RunRsyncIncremental(cmd.Context(), cfg)
},
}
func init() {
backupCmd.AddCommand(backupLocalCmd)
}