Post-deploy fixes (v0.12.7a)
This commit is contained in:
@@ -457,16 +457,11 @@ func (r *Router) backupSnapshots(w http.ResponseWriter, req *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// Filter by stack if requested — only return snapshots that include the app's HDD paths.
|
||||
if stackName := req.URL.Query().Get("stack"); stackName != "" {
|
||||
mounts := r.backupMgr.GetStackHDDMounts(stackName)
|
||||
if len(mounts) > 0 {
|
||||
// App has HDD data — filter to snapshots containing those paths
|
||||
snapshots = filterSnapshotsByPaths(snapshots, mounts)
|
||||
}
|
||||
// Apps without HDD mounts: return all snapshots (they all contain
|
||||
// the stacks dir + DB dumps which cover this app's config and database)
|
||||
}
|
||||
// All snapshots contain the stacks dir + DB dumps, so they're useful for
|
||||
// any app (config + DB restore). Apps with HDD data get user data restored
|
||||
// too — but only from snapshots that include those paths (post-v0.12.7).
|
||||
// We don't filter here because older snapshots still allow config+DB restore,
|
||||
// and the RestoreApp function extracts whatever paths are available.
|
||||
|
||||
if snapshots == nil {
|
||||
snapshots = []backup.SnapshotInfo{}
|
||||
|
||||
Reference in New Issue
Block a user