v0.14.0: Per-drive backup architecture + storage path overhaul
Major refactor of backup and storage paths: - Per-drive restic repos at <drive>/backups/primary/restic/ - Per-app DB dumps at <drive>/backups/primary/<app>/db-dumps/ - Remove global BackupDir, DBDumpDir, ResticRepo config fields - Add SystemDataPath config (fallback for apps without HDD) - New backup/paths.go with pure path computation helpers - Add GetStackHDDPath to StackDataProvider interface - Restic methods now accept repoPath as parameter - Cross-drive backup uses new secondary path structure - Rename storage/ to appdata/ in scripts and compose templates - Update protected HDD paths (storage → appdata + backups) - Simplify backup UI (remove global path displays) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,11 +46,10 @@ type InfrastructureConfig struct {
|
||||
}
|
||||
|
||||
type PathsConfig struct {
|
||||
StacksDir string `yaml:"stacks_dir"`
|
||||
DataDir string `yaml:"data_dir"`
|
||||
BackupDir string `yaml:"backup_dir"`
|
||||
DBDumpDir string `yaml:"db_dump_dir"`
|
||||
HDDPath string `yaml:"hdd_path"`
|
||||
StacksDir string `yaml:"stacks_dir"`
|
||||
DataDir string `yaml:"data_dir"`
|
||||
SystemDataPath string `yaml:"system_data_path"`
|
||||
HDDPath string `yaml:"hdd_path"`
|
||||
}
|
||||
|
||||
type WebConfig struct {
|
||||
@@ -75,7 +74,6 @@ type StacksConfig struct {
|
||||
|
||||
type BackupConfig struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
ResticRepo string `yaml:"restic_repo"`
|
||||
ResticPasswordFile string `yaml:"restic_password_file"`
|
||||
DBDumpSchedule string `yaml:"db_dump_schedule"`
|
||||
ResticSchedule string `yaml:"restic_schedule"`
|
||||
@@ -185,13 +183,11 @@ func applyDefaults(cfg *Config) {
|
||||
|
||||
d(&cfg.Paths.StacksDir, "/opt/docker/stacks")
|
||||
d(&cfg.Paths.DataDir, "/opt/docker/felhom-controller/data")
|
||||
d(&cfg.Paths.BackupDir, "/srv/backups")
|
||||
d(&cfg.Paths.DBDumpDir, "/srv/backups/db-dumps")
|
||||
d(&cfg.Paths.SystemDataPath, "/mnt/sys_drive")
|
||||
d(&cfg.Web.Listen, ":8080")
|
||||
d(&cfg.Git.Branch, "main")
|
||||
d(&cfg.Git.SyncInterval, "15m")
|
||||
d(&cfg.Stacks.UpdateWindow, "03:00-05:00")
|
||||
d(&cfg.Backup.ResticRepo, "/srv/backups/restic-repo")
|
||||
d(&cfg.Backup.DBDumpSchedule, "02:30")
|
||||
d(&cfg.Backup.ResticSchedule, "03:00")
|
||||
d(&cfg.Backup.PruneSchedule, "weekly")
|
||||
|
||||
Reference in New Issue
Block a user