From 735ea4d342d5ee1e2850ab27c7a60b543753c97a Mon Sep 17 00:00:00 2001 From: Anton Korotkov Date: Thu, 21 Dec 2023 11:12:49 +0200 Subject: [PATCH] check if one backup in range --- pkg/service/backup_backend_s3.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/service/backup_backend_s3.go b/pkg/service/backup_backend_s3.go index 839f814a..8f3c1e57 100644 --- a/pkg/service/backup_backend_s3.go +++ b/pkg/service/backup_backend_s3.go @@ -66,6 +66,9 @@ func (s *BackupBackendS3) FullBackupList(from, to int64) ([]model.BackupDetails, if s.fullBackupInProgress.Load() { return []model.BackupDetails{}, nil } + if lastRun.UnixMilli() < from || lastRun.UnixMilli() >= to { + return []model.BackupDetails{}, nil + } return []model.BackupDetails{{ Key: ptr.String(s3prefix + backupFolder), LastModified: &lastRun,