Question

I know how to backup and restore a whole site using drush archive-dump and archive-restore which is explined in this link: Backup and restore Drupal sites with Drush

my question: is it possible to do the archive-dump and the archive-restore using aliases from a different server of the site.?

I have tried putting in the aliases file remote-host and root but it doesn't work.

Was it helpful?

Solution

After multiple tests using the command drush archive-dump and archive-restore, I came to the conclusion that it is necessary to install drush in the final servers. I wasn't able to run the command archive-dump from a server which has drush installed to make a backup of the other server which doesn't have drush installed because using the aliases file the drush cmd in the source server raises the following error:

bash: drush: command not found

That means that drush is needed in the destiny server. The way I concluded this was making a debug from the source server using the option --verbose and I realized that when you use the aliases file in drush command at the end this command makes a call with ssh like this: executing

ssh -o PasswordAuthentication=no user@server 'drush --verbose --uri=urlserver.com --root=/var/www/html archive-dump --destination=/home/user/backup/example.com.tar.gz --overwrite 2>&1'

If you notice the drush command is simply being passed to the destination server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top