diff --git a/pkg/comp-functions/functions/vshnpostgres/postgresql_deploy.go b/pkg/comp-functions/functions/vshnpostgres/postgresql_deploy.go index 934476d28..3f1b4d881 100644 --- a/pkg/comp-functions/functions/vshnpostgres/postgresql_deploy.go +++ b/pkg/comp-functions/functions/vshnpostgres/postgresql_deploy.go @@ -81,7 +81,7 @@ func DeployPostgreSQL(ctx context.Context, svc *runtime.ServiceRuntime) *xfnprot return runtime.NewWarningResult(fmt.Errorf("cannot create podMonitor object: %w", err).Error()) } - if comp.Spec.Parameters.Restore != nil { + if comp.Spec.Parameters.Restore != nil && comp.Spec.Parameters.Restore.BackupName != "" && comp.Spec.Parameters.Restore.ClaimName != "" { l.Info("Create copy job") err = createCopyJob(comp, svc) if err != nil {