/** * Extract the supplied backup. * * @param DatabaseBackup $backup * @return void * @throws \RuntimeException if the archive for the given backup does not * exist or is not readable. */ public function extract(DatabaseBackup $backup) { $archive = $backup->getTempFileName(); if (!is_readable($archive)) { throw new \RuntimeException("Archive does not exist or is not readable: {$archive}"); } exec("{$this->getBinary()} -fk {$archive}"); }