Like many, I’ve got my webhosting with Godaddy. I quite like them, as they’re cheap, you can host multiple websites very easily and they provide you with a really good level of control. My only issue with them is that you don’t have rsync functionality to backup. I much prefer rsync for all of my backups, as the incremental process is so much faster than a full ftp backup.
I was having a look at this problem this morning when I found this page here. It outlines a way to get a copy of rsync onto godaddy for use. Unfortunately, it was a bit thin on details, so I thought I’d expound them a bit more here, so that people from the future may be able to learn from what I’ve found.
Godaddy’s hosting is currently using CentOS 5.5, so you’ll need to find a copy of rsync which is compatible with that OS. Version 2.6.8 currently works. You can find it here.
This is an RPM package, so it’s not easy to open. Grab 7-zip (freeware) program, which can read it just fine. Go to the ‘bin’ directory, and copy the ‘rsync’ executable. Copy it to Godaddy.
I had troubles when I copied it. For some reason, my FTP program copied it in ASCII mode, which corrupted it. I had to manually set my FTP program to transfer in Binary mode. Make sure the filesize comes out at 313688 bytes.
Once it’s on Godaddy, log in with SSH. SSH isn’t automatic with Godaddy. You need to go to your hosting control panel and turn it on.
home$ ssh genericusername@example.com
Create a new directory called ‘bin’.
example$ mkdir bin
Move the rsync executable to the bin directory
example$ mv ~/html/rsync bin/
Make the program executable.
example$ chmod 755 rsync
That’s all you need to do! This then is the command I use to backup my websites.
home$ rsync -aviPh --progress --delete-after -e ssh --rsync-path=bin/rsync genericuser@example.com:~/html/ /mnt/Backups/Websites/
FYI – This isn’t working today…
The rsync program dumps core.
It appears the only way to do this is via sshfs. Here is a blog post I found: http://notbrainsurgery.livejournal.com/39281.html
SSHFS will never exist under cygwin, so for me it’s a show stopper. Back to FTP I guess =)
I just gave this a test – it’s still working for me just fine.
Did you copy over the rsync executable using BINary FTP transfer? The first time I did it, I just let my FTP program pick the protocol, and it defaulted to ASCII, which then core dumped. So double-check the transfer method and the final file size.
If you’re still having trouble after that, drop me another line, and I’ll see if we can figure it out for you. I may need to amend my blog post!
Hi,
Same problem. Transfered in binary, also tried unpacking .cpio archive on the server, have 313688 filesize of rsync (from usr/bin/ directory in the archive), and I still get command not found.
(just to mention, from .rpm i got cpio archive rsync-2.6.8-3.1.i386.cpio)
Any ideas?
Ah, yep!
ASCII mode strikes again.
FWIW, my rsync options were -rRv. I don’t want all of the GoDaddy usernames, permisions and groups.
You sir, are awesome. This is exactly what I was searching the web for. Thanks for explaining it so clearly!
Thanks for this posting – works flawlessly !
Michael
great write-up, thanks! still works, as of 5/5/12. hey, i was thinking of doing an even more detailed, step by step guide to setting this up, but was wondering if it’s against godaddy’s TOS… i wouldn’t want to draw unwanted attention 🙂 anybody know?
Just to thank you, still workin aon 09/01/2012
This works fine from GoDaddy, but when trying to connect from a remote to GoDaddy, the rsync command was not found. It seems that the .bash_profile script is not run when rsync connects to GoDaddy so it does not find the command.
The solution is to add the –rsync-path= option to the rsync command, something like
rsync -t -v *.txt –rsync-path=~/bin/rsync someuser@yourgodaddysite.com:html
This copies all the “.txt” files to the the html folder, the one accessible from FTP, using the username someuser.
Thanks so much. It worked perfectly and much better than using sshfs. Sshfs kept getting a broken pipe while doing rsync.
Wow worked like a charm, thanks!
Works great. Very easy to follow. Thanks!
Thanks for the detailed article. Note that it is also possible to use wget, rpm2cpio, and cpio to retrieve everything on the server itself.
# Identify the CentOS release
-bash-3.2$ cat /etc/issue
CentOS release 5.8 (Final)
Kernel \r on an \m
# Double check the processor: i686 / i386
-bash-3.2$ uname -a
Linux .....secureserver.net 2.6.18-348.6.1.el5PAE #1 SMP Tue May 21 16:17:08 EDT 2013 i686 i686 i386 GNU/Linux
# Make a directory to download files, and change into it
-bash-3.2$ cd ~
-bash-3.2$ mkdir -p local/rsync
-bash-3.2$ cd local/rsync
# Download the corresponding release of rsync.
# You can find the correct CentOS rpm by replacing "5.8"
# in the URL with your version, then looking in the
# CentOS directory for the 'rsync-.....rpm' file.
# URL: http://vault.centos.org/5.8/os/i386/CentOS/
-bash-3.2$ wget 'http://vault.centos.org/5.8/os/i386/CentOS/rsync-3.0.6-4.el5_7.1.i386.rpm'
# Extract the files from the rpm
-bash-3.2$ rpm2cpio rsync-3.0.6-4.el5_7.1.i386.rpm | cpio -idmv
./etc/xinetd.d/rsync
./usr/bin/rsync
./usr/share/doc/rsync-3.0.6
./usr/share/doc/rsync-3.0.6/COPYING
./usr/share/doc/rsync-3.0.6/NEWS
./usr/share/doc/rsync-3.0.6/OLDNEWS
./usr/share/doc/rsync-3.0.6/README
./usr/share/doc/rsync-3.0.6/support
./usr/share/doc/rsync-3.0.6/support/Makefile
./usr/share/doc/rsync-3.0.6/support/atomic-rsync
./usr/share/doc/rsync-3.0.6/support/cvs2includes
./usr/share/doc/rsync-3.0.6/support/deny-rsync
./usr/share/doc/rsync-3.0.6/support/file-attr-restore
./usr/share/doc/rsync-3.0.6/support/files-to-excludes
./usr/share/doc/rsync-3.0.6/support/git-set-file-times
./usr/share/doc/rsync-3.0.6/support/logfilter
./usr/share/doc/rsync-3.0.6/support/lsh
./usr/share/doc/rsync-3.0.6/support/mnt-excl
./usr/share/doc/rsync-3.0.6/support/munge-symlinks
./usr/share/doc/rsync-3.0.6/support/rrsync
./usr/share/doc/rsync-3.0.6/support/rsyncstats
./usr/share/doc/rsync-3.0.6/support/savetransfer.c
./usr/share/doc/rsync-3.0.6/tech_report.tex
./usr/share/man/man1/rsync.1.gz
./usr/share/man/man5/rsyncd.conf.5.gz
From there you can copy usr/bin/rsync to wherever you like, or use it from where it is:
$ rsync ... --rsync-path=~/local/rsync/usr/bin/rsync localfiles ...