To make it run correctly, I had to replace Append option (-r) by Create option (-c) on line 53:
/**
* Implentation of hook_provision_backup()
*/
function drush_provision_drupal_provision_backup($url) {
$backup_file = drush_get_option('backup_file');
// Adds the site directory into the backup file
drush_log(dt("Adding sites directory to !backup_file", array('!backup_file' => $backup_file)), 'backup');
// $result = provision_shell_exec("tar -C %s -p -r -f %s .", drush_get_option('sites_path') . "/$url", $backup_file);
$result = provision_shell_exec("tar -C %s -p -c -f %s .", drush_get_option('sites_path') . "/$url", $backup_file);
if (!$result && !drush_get_option('force', false)) {
drush_set_error('PROVISION_BACKUP_FAILED', dt("Could not back up sites directory for drupal"));
}
}
Adiran,
I would like to have some feedback on this.
Is it a bug?
Is there a design matter?
Thanks.
Alexandre
Comments
Comment #1
anarcat commentedWhat error are you getting with -r? It indeed looks odd, and -c is probably the right flag to use in this case... Could you make a proper patch?
Comment #2
adrian commentedThis should be -c
-r was a left over from the 0.1 release, which added the db dump in a separate step to the existing tarball (which was created first).
this wasn't causing issues for me on any actual installation, but i am patching it any way.
Comment #3
adrian commentedthat is as soon as i can actually reach cvs.drupal.org
Comment #4
anarcat commentedThis fix wasn't actually committed, i just committed it.