R-49 (D21 = B): a template may exclude a named volume from every backup (backup.volumes, class excluded) — Immich's model cache; guarded, red-proved; unreleased
gates / gates (push) Successful in 1m50s

This commit is contained in:
2026-10-22 16:21:38 +02:00
parent cbc944c3c0
commit 6a17c95815
10 changed files with 246 additions and 1 deletions
+1
View File
@@ -1313,6 +1313,7 @@ func deepCopyStack(s *Stack) Stack {
b.Userdata = append([]appbackup.BindSpec(nil), b.Userdata...)
b.HDD = append([]appbackup.BindSpec(nil), b.HDD...)
b.Import = append([]appbackup.BindSpec(nil), b.Import...)
b.Volumes = append([]appbackup.VolumeSpec(nil), b.Volumes...)
cp.Meta.Backup = &b
}
+11
View File
@@ -597,6 +597,17 @@ func (m *Manager) ClassifiedBinds(name string) ([]appbackup.ClassifiedBind, bool
return appbackup.ClassifyBinds(meta.Backup, binds)
}
// ExcludedDockerVolumes returns the Docker names of the stack's named volumes its template excludes from every backup
// (R-49, D21 = B; appbackup.ExcludedDockerVolumes), and a sentence per template entry that was ignored.
func (m *Manager) ExcludedDockerVolumes(name string) ([]string, []string) {
stack, ok := m.GetStack(name)
if !ok || name == SambaStackName {
return nil, nil
}
meta := LoadMetadata(filepath.Dir(stack.ComposePath))
return appbackup.ExcludedDockerVolumes(meta.Backup, stack.ComposePath)
}
// HasDeployField reports whether the app declares a deploy field for the given env var.
//
// R-351: the caller that needs this is the restore prefill, and the question it is really asking is