1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-11 11:41:33 +02:00

add check

This commit is contained in:
Anastasia 2018-08-02 17:35:48 +03:00
parent 27497d54c5
commit 8f4232db34

View File

@ -203,9 +203,11 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
dest_backup = current_backup;
dest_backup_index = i;
}
}
if (dest_backup == NULL)
elog(ERROR, "Backup satisfying target options is not found.");
/* If we already found dest_backup, look for full backup. */
if (dest_backup)
{
@ -238,6 +240,9 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
}
}
if (base_full_backup == NULL)
elog(ERROR, "Full backup satisfying target options is not found.");
/*
* Ensure that directories provided in tablespace mapping are valid
* i.e. empty or not exist.