diff --git a/pkg/ccl/backupccl/backupinfo/manifest_handling.go b/pkg/ccl/backupccl/backupinfo/manifest_handling.go index 414727386655..0a396321ce4c 100644 --- a/pkg/ccl/backupccl/backupinfo/manifest_handling.go +++ b/pkg/ccl/backupccl/backupinfo/manifest_handling.go @@ -164,11 +164,12 @@ func ReadBackupManifestFromStore( // If we did not find `BACKUP_METADATA` we look for the // `BACKUP_MANIFEST` file as it is possible the backup was created by a // pre-23.1 node. + log.VInfof(ctx, 2, "could not find BACKUP_METADATA, falling back to BACKUP_MANIFEST") backupManifest, backupManifestMemSize, backupManifestErr := ReadBackupManifest(ctx, mem, exportStore, backupbase.BackupManifestName, encryption, kmsEnv) if backupManifestErr != nil { if !errors.Is(backupManifestErr, cloud.ErrFileDoesNotExist) { - return backuppb.BackupManifest{}, 0, err + return backuppb.BackupManifest{}, 0, backupManifestErr } // If we did not find a `BACKUP_MANIFEST` we look for a `BACKUP` file as @@ -176,9 +177,16 @@ func ReadBackupManifestFromStore( // // TODO(adityamaru): Remove this logic once we disallow restores beyond // the binary upgrade compatibility window. + log.VInfof(ctx, 2, "could not find BACKUP_MANIFEST, falling back to BACKUP") oldBackupManifest, oldBackupManifestMemSize, oldBackupManifestErr := ReadBackupManifest(ctx, mem, exportStore, backupbase.BackupOldManifestName, encryption, kmsEnv) if oldBackupManifestErr != nil { + if errors.Is(oldBackupManifestErr, cloud.ErrFileDoesNotExist) { + log.VInfof(ctx, 2, "could not find any of the supported backup metadata files") + return backuppb.BackupManifest{}, 0, + errors.Wrapf(oldBackupManifestErr, "could not find BACKUP manifest file in any of the known locations: %s, %s, %s", + backupbase.BackupMetadataName, backupbase.BackupManifestName, backupbase.BackupOldManifestName) + } return backuppb.BackupManifest{}, 0, oldBackupManifestErr } else { // We found a `BACKUP` manifest file.