Skip to content

Commit 274ce1e

Browse files
committed
PBM-1443: add error message about reporting for physical restore
1 parent d859b9e commit 274ce1e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/pbm/diagnostic.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ func handleDiagnostic(
3333
cid, err := sdk.FindCommandIDByName(ctx, pbm, opts.name)
3434
if err != nil {
3535
if errors.Is(err, sdk.ErrNotFound) {
36+
// after physical restore, command and log collections are empty.
37+
rst, err := pbm.GetRestoreByName(ctx, opts.name)
38+
if err == nil && rst.Type != sdk.LogicalBackup {
39+
return nil, errors.New("PBM does not support reporting for physical restores")
40+
}
3641
return nil, errors.New("command not found")
3742
}
3843
return nil, errors.Wrap(err, "find opid by name")

0 commit comments

Comments
 (0)