D47 / R-1269 (P2): a new install never writes into an earlier install's backup — every install has an identity (install_id), the unit records it, every unit writer asks first; another install's unit is set aside whole (backups/set-aside/<app>/<stamp>, a D25 kept copy, „Visszaállítás” + „Eltávolítás” on the restore page); a move that fails refuses the write. Red-proved. Commit only.
gates / gates (push) Successful in 1m33s
gates / gates (push) Successful in 1m33s
This commit is contained in:
@@ -1050,13 +1050,15 @@ func (r *Router) removeStack(w http.ResponseWriter, req *http.Request, name stri
|
||||
// volume tars) and its Tier-2 mirror, not only db-dumps. The mirror is on another drive, outside
|
||||
// RemoveStack's per-app base, so the backup manager removes it — and its location is read NOW,
|
||||
// before the cross-drive record is cleared below. Off-site snapshots are not touched by this path.
|
||||
var backupPaths, mirrorDirs []string
|
||||
var backupPaths, mirrorDirs, setAsideDirs []string
|
||||
if body.RemoveBackups && r.backupMgr != nil {
|
||||
nsRoot := r.backupMgr.AppNamespaceRoot(name)
|
||||
if nsRoot != "" {
|
||||
backupPaths = append(backupPaths, backup.RecoveryUnitPath(nsRoot, name), backup.AppDBDumpPath(nsRoot, name))
|
||||
}
|
||||
mirrorDirs = r.backupMgr.Tier2MirrorDirsForApp(name)
|
||||
// D47: the units of earlier installs set aside for this app are its backups too (the D25 kept-copy rule).
|
||||
setAsideDirs = r.backupMgr.SetAsideDirsForApp(name)
|
||||
}
|
||||
|
||||
resp, err := r.stackMgr.RemoveStack(name, body.RemoveHDDData, backupPaths)
|
||||
@@ -1086,6 +1088,9 @@ func (r *Router) removeStack(w http.ResponseWriter, req *http.Request, name stri
|
||||
if body.RemoveBackups && r.backupMgr != nil && len(mirrorDirs) > 0 {
|
||||
resp.BackupPathsRemoved = append(resp.BackupPathsRemoved, r.backupMgr.RemoveTier2Mirrors(name, mirrorDirs)...)
|
||||
}
|
||||
if body.RemoveBackups && r.backupMgr != nil && len(setAsideDirs) > 0 {
|
||||
resp.BackupPathsRemoved = append(resp.BackupPathsRemoved, r.backupMgr.RemoveSetAsideUnits(name, setAsideDirs)...)
|
||||
}
|
||||
if body.RemoveBackups {
|
||||
resp.BackupPathsRemoved = append(resp.BackupPathsRemoved, r.removeVerificationCopy(name)...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user