We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5534b10 commit be84258Copy full SHA for be84258
src/restore.c
@@ -131,6 +131,18 @@ do_restore_or_validate(time_t target_backup_id,
131
if (target_backup_id && current_backup->start_time > target_backup_id)
132
continue;
133
134
+ /*
135
+ * [PGPRO-1164] If BACKUP_ID is not provided for restore command,
136
+ * we must find the first valid(!) backup.
137
+ */
138
+
139
+ if (is_restore && target_backup_id == 0 && current_backup->status != BACKUP_STATUS_OK)
140
+ {
141
+ elog(WARNING, "Skipping backup %s, because it has non-valid status: %s",
142
+ base36enc(current_backup->start_time), status2str(current_backup->status));
143
+ continue;
144
+ }
145
146
/*
147
* We found target backup. Check its status and
148
* ensure that it satisfies recovery target.
0 commit comments