Drush Sync on GoDaddy Shared Hosting

Marko RosicWeb DevelopmentLeave a Comment

If you are like me, you’ve just decided to give Drush a go and you’ve spent couple of days configuring all sorts of conf files, ssh keys and what not just to realize that GoDaddy and other providers don’t provide rsync for us “cheepo” customers.

This was, I must say, very frustrating. So here’s wharf finally worked for me with big help of my friend that compiled a rsync for me:

1. Install drush on both machines and configure ssh, as explained in many other tutorials.
2. Godaddy doesn’t have “which” and many other commands so you have to add something like this to your .bashrc:

export PATH={HOME}/drush:${PATH}
export COLUMNS
alias drush='/usr/local/php5/bin/php ~/drush/drush.php'
alias php='/usr/local/php5/bin/php'

3. And since GoDaddy won’t read your .bashrc when you connect via non interactive ssh you will need to add following peace of code to the beginning of your public ssh key in authorized_keys file on remote server:

command="if ; then /bin/bash; else source ~/.bashrc; eval \"${SSH_ORIGINAL_COMMAND}\"; fi; " ssh-rsa AAAAB...

4. Finally, you will need rsync binary compiled for Centos 5.2 that GoDaddy uses and you can download it here.

Cheers…

Share

Previous Article
Next Article