Unison and Godaddy Linux Hosting

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.

Here’s a TCL script written for use with VMD to automatically generate a bunch of contours from grid files in a specific directory. The script saves the viewing angle and other rendering aspects.

#Set the directory for looking for files here
set dir "/home/cogswell/Downloads/dx/30-blend-95"
set currentDir [pwd]
cd $dir

#set height and width
#set h 500
#set w 500
set h ["%h"]
set w ["%w"]

#Set global defaults and preferences
axes location off
display antialias on
display depthcue on

# save the current display state and representation style
set viewpt [molinfo top get {center_matrix rotate_matrix scale_matrix global_matrix}]
set myrep [molinfo top get {rep}]
mol default style $myrep

foreach f [glob "p*.dx"] {
set file [exec basename $f ".dx"]
mol off top
mol new "$f"
#mol addrep top
molinfo top set {center_matrix rotate_matrix scale_matrix global_matrix} $viewpt
render POV3 "$file.pov" povray +H%h +W%w -I%s -O"$file.png" -D +X +A
mol delete top
}

#return to the original molecule and directory
molinfo top set {center_matrix rotate_matrix scale_matrix global_matrix} $viewpt
mol on top