mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-23 14:24:03 +08:00
fix: redis aof 备份恢复与版本匹配
This commit is contained in:
parent
24b3501f38
commit
dd06ff73e6
1 changed files with 4 additions and 1 deletions
|
@ -121,7 +121,10 @@ func handleRedisRecover(redisInfo *repo.RootInfo, recoverFile string, isRollback
|
|||
}
|
||||
|
||||
if appendonly == "yes" {
|
||||
if !strings.HasSuffix(recoverFile, ".tar.gz") && !strings.HasSuffix(recoverFile, ".aof") {
|
||||
if redisInfo.Version == "6.0.16" && !strings.HasSuffix(recoverFile, ".aof") {
|
||||
return buserr.New(constant.ErrTypeOfRedis)
|
||||
}
|
||||
if redisInfo.Version == "7.0.5" && !strings.HasSuffix(recoverFile, ".tar.gz") {
|
||||
return buserr.New(constant.ErrTypeOfRedis)
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue