provision-deploy fails with: Failed to extract the contents of /var/aegir/backups/xxxx.tar.gz to (The target directory could not be written to)
The command executed as aegir user:
drush --platform='/var/aegir/drupal-6.19' --uri='model.example.org' provision-deploy /var/aegir/backups/modelgruppen.tar.gz
The full output:
Failed to extract the contents of [error]
/var/aegir/backups/modelgruppen.tar.gz to (The target directory
could not be written to)
An error occurred at function : [error]
drush_provision_drupal_pre_provision_deploy
aegir@node:~/drupal-6.19$ drush --platform='/var/aegir/drupal-6.19' --uri='model.example.org' provision-deploy /var/aegir/backups/modelgruppen.tar.gz
Failed to extract the contents of [error]
/var/aegir/backups/modelgruppen.tar.gz to (The target directory
could not be written to)
An error occurred at function : [error]
drush_provision_drupal_pre_provision_deploy
Notice the lack of a destination in the error messages. I believe the extract path is set in drush_provision_drupal_provision_deploy_validate:
(deploy.provision.inc line 38)
drush_set_option('extract_path', d()->site_path);
But where is site_path comming from? From the provisionSite class? (provision.environment.inc line 566) But do we have a Site Enviroment at this time? Or am I just giving the wrong parameters to provision-deply?
I must admit, I'm not that familiar with the provison code base to know that???
Running the same command with --debug gives this output:
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.24 sec, [bootstrap]
4.15 MB]
Loading drushrc "/var/aegir/drupal-6.19/drushrc.php" into "drupal" [bootstrap]
scope. [0.24 sec, 4.15 MB]
Initialized Drupal 6.19 root directory at /var/aegir/drupal-6.19 [notice]
[0.25 sec, 4.89 MB]
Found command: provision-deploy (commandfile=provision) [0.27 sec, [bootstrap]
4.88 MB]
Initializing drush commandfile: drush_make [0.27 sec, 4.88 MB] [bootstrap]
Initializing drush commandfile: drush_make_d_o [0.27 sec, 4.88 MB] [bootstrap]
Initializing drush commandfile: provision [0.27 sec, 4.88 MB] [bootstrap]
Load alias @self [0.27 sec, 4.88 MB] [notice]
Load alias @server_master [0.27 sec, 4.88 MB] [notice]
Loading mysql driver for the db service [0.27 sec, 4.89 MB] [notice]
Loading apache driver for the http service [0.27 sec, 4.89 MB] [notice]
Including /var/aegir/.drush/provision/db/deploy.provision.inc [0.27 [bootstrap]
sec, 4.89 MB]
Including /var/aegir/.drush/provision/http/deploy.provision.inc [0.27[bootstrap]
sec, 4.89 MB]
Including /var/aegir/.drush/provision/platform/deploy.provision.inc [bootstrap]
[0.27 sec, 4.9 MB]
Deploying site from /var/aegir/backups/modelgruppen.tar.gz [0.28 sec, [message]
4.95 MB]
Failed to extract the contents of [error]
/var/aegir/backups/modelgruppen.tar.gz to (The target directory
could not be written to) [0.28 sec, 4.95 MB]
An error occurred at function : [error]
drush_provision_drupal_pre_provision_deploy [0.28 sec, 4.96 MB]
Changes for drush_provision_drupal_pre_provision_deploy module have [rollback]
been rolled back. [0.28 sec, 4.96 MB]
Changes for drush_db_pre_provision_deploy module have been rolled [rollback]
back. [0.28 sec, 4.96 MB]
Command dispatch complete [0.28 sec, 4.96 MB] [notice]
Peak memory usage was 5.4 MB [0.28 sec, 4.96 MB] [memory]
aegir version: 0.4-alpha12
Drush: 6.x-3.3
PHP: 5.2.4
Ubuntu 8.04
Please advice
Thanks
Hans Henrik
Comments
Comment #1
hhg CreditAttribution: hhg commentedWell, sometimes it just a matter of finding the rigth documentation. Adrians Excelent Blog at http://developmentseed.org/blog/2010/jul/06/aegir-support-multi-server-s... tells HOW to use provision from the commandline:
First, setup an alias for the new site:
Then deploy the backup:
I'm getting some warnings, but the site is created:
Maybe I'm still missing something in the alias setup?
Comment #2
adrinux CreditAttribution: adrinux commentedI'm trying to deploy some sites form an alpha8 backup to a freshly installed alpha13 and getting the same error. as is mrfelton on IRC.
It looks like a permissions error, mrfelton gets around the issue by setting permissions on files.
We're both using Ubuntu 10.04.
Comment #3
adrinux CreditAttribution: adrinux commentedI also had success creating the alias first:
And then running the provision-deploy:
Note that you specify the destination url via the alias, not with the deploy as was previously the case.
Comment #4
DanielJohnston CreditAttribution: DanielJohnston commentedI tried the suggested solution here without success. Continue to get a permissions error, and can't find any folders with permissions problems. Running command as user aegir generates the error below, running as root can't find settings.php.
As an aside, the reason I'm trying to deploy a site through this in the first place is that Aegir would not allow me to restore a backup of a site - that broke during migration - to its previous platform.
Comment #5
DanielJohnston CreditAttribution: DanielJohnston commentedOK I seem to have got to the bottom of this. I didn't know the name of the variable for the platform so I just used the platform's path instead. Luckily someone posted the solution on a random part of the internet yesterday at http://pastie.org/pastes/1212973 - the variable name is found in /var/aegir/config/server_master/apache/platform.d as the first part of the filename for the relevant platform config file. Using the method above with the platform variable name from there has done the trick. Good lord that wasn't as simple as I'd hoped.
Comment #6
adrinux CreditAttribution: adrinux commentedThat was my pastie, but the info is a bit wrong, you'll actually find the alias in /var/aegir/.drush, so for the platform mentioned in #3 above, which is called d6, you should find:
and the alias is thus platform_d6
Comment #7
simeI had success with #3, and created a page that describes a workable process for migrating sites from Aegir to new Aegir0.4a15. Could be improved, but it's useful I hope.
http://community.aegirproject.org/node/117
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedThe --platform there should be an alias and not a path to the platform. Per #3.
Closing this as it works as designed (if implemented correctly per #3 and #7).