diff --git a/pkg/persistence/object_store.go b/pkg/persistence/object_store.go index 93bcfcc6dd..8805146f77 100644 --- a/pkg/persistence/object_store.go +++ b/pkg/persistence/object_store.go @@ -235,14 +235,6 @@ func (s *objectBackupStore) PutBackup(info BackupInfo) error { } } - /* - if info.Metadata == nil { - // If we don't have metadata, something failed, and there's no point in continuing. An object - // storage bucket that is missing the metadata file can't be restored, nor can its logs be - // viewed. - return nil - } - */ if info.Metadata != nil { if err := seekAndPutObject(s.objectStore, s.bucket, s.layout.getBackupMetadataKey(info.Name), info.Metadata); err != nil { // failure to upload metadata file is a hard-stop diff --git a/pkg/persistence/object_store_test.go b/pkg/persistence/object_store_test.go index 137d93e6c7..f3cb554866 100644 --- a/pkg/persistence/object_store_test.go +++ b/pkg/persistence/object_store_test.go @@ -312,7 +312,7 @@ func TestPutBackup(t *testing.T) { }, }, { - name: "don't upload data when metadata is nil", + name: "data should be uploaded even when metadata is nil", metadata: nil, contents: newStringReadSeeker("contents"), log: newStringReadSeeker("log"), @@ -320,7 +320,13 @@ func TestPutBackup(t *testing.T) { snapshots: newStringReadSeeker("snapshots"), resourceList: newStringReadSeeker("resourceList"), expectedErr: "", - expectedKeys: []string{"backups/backup-1/backup-1-logs.gz"}, + expectedKeys: []string{ + "backups/backup-1/backup-1.tar.gz", + "backups/backup-1/backup-1-logs.gz", + "backups/backup-1/backup-1-podvolumebackups.json.gz", + "backups/backup-1/backup-1-volumesnapshots.json.gz", + "backups/backup-1/backup-1-resource-list.json.gz", + }, }, }