restore a site backup thorugh drush command

Events happening in the community are now at Drupal community events on www.drupal.org.
drup_lr's picture

we run a nightly sites backup thorugh command line and doesn't show up in the Aegir admin , i would like to restore a site backup thorugh drush command any ideas ? thanks

Comments

provision-deploy

j2parker's picture

The below had worked as of 0.4-alpha7. Replace the pertinent parts with your specific data.

As aegir user:

$ drush --root='/var/aegir/platform/destination_platform' provision-deploy 'example.com' '/var/aegir/backups/example.com-20100429.085003.tar.gz' --backend

Following this command verify the destination platform in the aegir frontend which will then import the site.

A new site node will be created for this imported site which will be different from the original site. The site will retain the original database name.

thank you

drup_lr's picture

i am getting this error . did i miss anything

The command 'drush.php provision-deploy example.com /var/aegir/backups/example.com-20100429.085003.tar.gz' could not be found.

Thanks

drush

j2parker's picture

Are you able to run drush as aegir user?

On Ubuntu: /usr/bin/php /var/aegir/drush/drush.php

In your command shown above you have not specified the Drupal root directory to use.

Also, how are you creating your backup?

thank you

drup_lr's picture

The below had worked as of 0.4-alpha7. Replace the pertinent parts with your specific data.

As aegir user:

$ drush --root='/var/aegir/platform/destination_platform' provision-deploy 'example.com' '/var/aegir/backups/example.com-20100429.085003.tar.gz' --backend
Following this command verify the destination platform in the aegir frontend which will then import the site.

i was able to restore the site using this command . it was really helpful. thank you

nope

DanielJohnston's picture

This links to support request at http://drupal.org/node/905386 and the solutions given in both of these discussions do not work for me. Not sure if this related to changes in Aegir and Drush, or if there's something wrong with my setup. The arguments suggested in this discussion don't appear to be at all understood by more recent versions of Drush / Aegir.

OK, as soon as I posted that

DanielJohnston's picture

OK, as soon as I posted that I found a solution someone else posted at http://pastie.org/pastes/1212973. Here we go:

# start by creating and adding the platform

# then create an alias, you can find the platform alias somewhere in /var/aegir/config, that's what you use instead of 'platform_drupal6':
php /var/aegir/drush/drush.php provision-save @example.com --context_type=site --platform=@platform_drupal6 --uri=example.com

# and do the import
php /var/aegir/drush/drush.php @example.com provision-deploy --debug /var/aegir/platforms/example.com-20100911.012602.tar.gz

Thank you!

milesw's picture

I couldn't get any of the previous commands to work either, but this solution you posted works for me also. Something must have changed in recent versions of provision.

The last version worked for

muschpusch's picture

The last version worked for me. Be aware that you need to provide an absolute path to the backup file!

Aegir hosting system

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: