Here's what I input at the command line:

drush arr /var/backups/backup_migrate/scheduled/[archive name].tar.gz/var/www/vhosts/[sitename]  --overwrite

It didn't restore either the code or database and gave me the confusing result:

Archive restored to /var/www/vhosts/[sitename]/[archivename]   
[ok]/var/www/vhosts/[sitename] [archivename]    

So I ran it with -debug:

drush arr /var/backups/backup_migrate/scheduled/[archive name].tar.gz    
/var/www/vhosts/[sitename]  --overwrite -debug

It didn't restore either the code or database and I got this output:

DRUSH_BACKEND:{"error":"DRUSH_UNKNOWN_OPTION","message":"Unknown options: --e, --g.

I have run this with drush 6, 7 and 8 with identical results. I have also tried copying the archive to the target Drupal directory and running arr.

Drush status outputs:

 PHP executable         :  /usr/bin/php
 PHP configuration      :  /etc/php.ini
 PHP OS                 :  Linux
 Drush script           :  /root/.composer/vendor/drush/drush/drush.php
 Drush version          :  8.0-dev
 Drush temp directory   :  /tmp
 Drush configuration    :
 Drush alias files      :  /etc/drush/prodyau.alias.drushrc.php  
/etc/drush/stageyaunet.alias.drushrc.php /etc/drush/devyau.alias.drushrc.php 

Here's the alias file for this site:

$remote_sites = '/var/www/vhosts/[sitename]'; // usually /var/www/drupal-
$aliases['devyau'] = array(
'uri' => '[sitename]',
//'remote-host' => '[ip-address]',
'remote-user' => 'root',
'root' => $remote_sites,
//'ssh-options' => '-p {if you ssh in on another port like 2222}',
'path-aliases' => array(
// '%drush-script' => '/root/.composer/vendor/bin/drush', // This is so you  
can have multiple drush installs and use different ones on different sites.
// 'php'=> '/usr/local/bin/php', // Again if you have different php's for 
different sites.
'%site' => 'sites/default/', // This is the important part here, it will   
ensure the proper bootstrap
'%dump-dir' => '/tmp', // This is where you want to dump your databases,   
normally /tmp folder I think.
//'%files' => $remote_sites . '/files' // Your sites file folder, incase it  
is somewhere else.
// You may actually need this, especially if you are running D7 since I 
haven't ever tested the db-url thing on D7 or above. 
'databases' => array (
'default' => array (
  'default' => array (
    'driver' => 'mysql',
    'database' => '[databasename]',
    'username' => '[username]',
    'password' => '[password]',

My alias files all work with drush rsync and drush sql-sync...I can move sites with the the aliases without any problems. I't just that I can't restore a backup archive using arr or archive-restore.

  • What platform are you on? It sounds like one of the executables that Drush is using does not support the same options as the ones the tool was designed to use. – greg_1_anderson Jul 20 '15 at 13:49
  • I'm on a Rackspace Centos server/Apache/Linux.Hey, it just occurred to me: The archive came from the Backup Migrate Module. Is restoring both database and file system even POSSIBLE in this senario? – Aaron Thain Jul 20 '15 at 14:42
  • 1
    The Backup and Migrate Module uses a completely separate format for it's backups; you should restore BAM archives with BAM, as Drush archive-restore only restores archives created by Drush archive-dump. – greg_1_anderson Jul 20 '15 at 15:51
  • Thank you greg_1_anderson, you answered my question: BAM archives cannot be restored with Drush. – Aaron Thain Aug 12 '15 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.