diff --git a/backend/app/service/backup_redis.go b/backend/app/service/backup_redis.go index 4e3fee8de..e71f75540 100644 --- a/backend/app/service/backup_redis.go +++ b/backend/app/service/backup_redis.go @@ -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 {