public function drush_version_control_backup::rollback

8.0.x backup.inc public drush_version_control_backup::rollback($project)
6.x backup.inc public drush_version_control_backup::rollback($project)
7.x backup.inc public drush_version_control_backup::rollback($project)
5.x backup.inc public drush_version_control_backup::rollback($project)
master backup.inc public drush_version_control_backup::rollback($project)

Implementation of rollback().

Overrides drush_version_control::rollback

File

commands/pm/version_control/backup.inc, line 49
Drush pm directory copy backup extension

Class

drush_version_control_backup

Code

public function rollback($project) {
  if (drush_get_option('no-backup', FALSE)) {
    return;
  }
  if (drush_move_dir($project['backup_target'], $project['full_project_path'], TRUE)) {
    return drush_log(dt("Backups were restored successfully."), LogLevel::OK);
  }
  return drush_set_error('DRUSH_PM_BACKUP_ROLLBACK_FAILED', dt('Could not restore backup and rollback from failed upgrade. You will need to resolve manually.'));
}