For a while I have been struggling to find a way to use unison to sync local files with Godaddy web hosting storage space. Although the Godaddy server runs Linux, it does not have unison installed. I found several suggestions to use sshfs to mount the Godaddy home directory locally, and then use unison to sync the mounted folder. This approach is very slow because it requires a lot of extra data transfer, and, as others have also found, large sshfs transfers to Godaddy seems to freeze after a short period of time.
However, there is a much better solution. It’s possible to install a local copy of unison in your Godaddy home directory and then use unison normally. Here’s how. First, I determined the operating system on my Godaddy server:
cat /etc/redhat-release
My account is hosted on a server running CentOS 5.5. So next I downloaded the appropriate unison rpm (i386) from http://pkgs.repoforge.org/unison/, and unpacked the contents of the rpm with this command:
rpm2cpio myrpmfile.rpm | cpio -idmv
If you do not choose the correct rpm to match your local unison version you may encounter version incompatibility errors, and if you choose the wrong rpm for the Godaddy operating system you may get errors about glibc.
Then place a link to unison executable in your bin folder so you will have unison in your PATH. At this point I could execute unison on the Godaddy server, but if I tried to sync from my local computer I would get an error that the unison command could not be found. The problem is that unison was only in the PATH for ssh connections that opened a shell, but unison passes its commands via the ssh command line. I couldn’t find a way to resolve this problem on the Godaddy side, but there is a workaround. By adding the following line to my unison .prf files, it’s possible to tell the Godaddy server where to find unison:
servercmd = /home/content/d/a/c/dac437/bin/unison
At this point, I was able to successfully sync 7GB of digital pictures to my Godaddy home directory using unison.
Thanks for the tip! The `servercmd` bit was the last bulb in the tree for me.
Great, glad to hear it was helpful!
I just wanted to go this route too. I had trouble finding the rpm, but you have set me in the right direction and unison is now up and running. This entry is still helpful. Thanks.