mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 解决快照恢复失败的问题 (#5739)
This commit is contained in:
parent
af9aef4d34
commit
5f2cfe6e20
@ -8,7 +8,7 @@ type PageContainer struct {
|
|||||||
PageInfo
|
PageInfo
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
State string `json:"state" validate:"required,oneof=all created running paused restarting removing exited dead"`
|
State string `json:"state" validate:"required,oneof=all created running paused restarting removing exited dead"`
|
||||||
OrderBy string `json:"orderBy" validate:"required,oneof=name status created_at"`
|
OrderBy string `json:"orderBy" validate:"required,oneof=name state created_at"`
|
||||||
Order string `json:"order" validate:"required,oneof=null ascending descending"`
|
Order string `json:"order" validate:"required,oneof=null ascending descending"`
|
||||||
Filters string `json:"filters"`
|
Filters string `json:"filters"`
|
||||||
ExcludeAppStore bool `json:"excludeAppStore"`
|
ExcludeAppStore bool `json:"excludeAppStore"`
|
||||||
|
@ -74,7 +74,7 @@ func (u *SnapshotService) HandleSnapshotRecover(snap model.Snapshot, isRecover b
|
|||||||
req.IsNew = true
|
req.IsNew = true
|
||||||
}
|
}
|
||||||
if isRecover && (req.IsNew || snap.InterruptStep == "AppData") {
|
if isRecover && (req.IsNew || snap.InterruptStep == "AppData") {
|
||||||
if err := recoverAppData(snapFileDir); err == nil {
|
if err := recoverAppData(snapFileDir); err != nil {
|
||||||
updateRecoverStatus(snap.ID, isRecover, "DockerDir", constant.StatusFailed, fmt.Sprintf("handle recover app data failed, err: %v", err))
|
updateRecoverStatus(snap.ID, isRecover, "DockerDir", constant.StatusFailed, fmt.Sprintf("handle recover app data failed, err: %v", err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user