Commit 4c4b4889 authored by mig5's avatar mig5 Committed by mig5
Browse files

#724294 - implement a rollback hook to delete stale tarballs after failed backups

parent 8a07ccde
......@@ -70,3 +70,14 @@ function drush_provision_drupal_provision_backup($url) {
drush_set_error('PROVISION_BACKUP_FAILED', dt("Could not back up sites directory for drupal"));
* Remove the backup file if something went wrong
function drush_provision_drupal_provision_backup_rollback($url=NULL) {
$backup_file = drush_get_option('backup_file');
if (file_exists($backup_file)) {
provision_path('unlink', $backup_file, TRUE,
dt("Removed stale backup file $backup_file"), dt("Failed deleting backup file $backup_file"));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment