public function verify_backup()
{
// If there are errors delete the database dump file
if ($this->get_errors(get_called_class()) && file_exists($this->get_backup_filepath())) {
unlink($this->get_backup_filepath());
}
// If we have an empty file delete it
if (@filesize($this->get_backup_filepath()) === 0) {
unlink($this->get_backup_filepath());
}
// If the database backup doesn't exist then the backup must have failed
if (!file_exists($this->get_backup_filepath())) {
return false;
}
return true;
}