Search: Site Web

Software reVisions

In pursuit of reliable, fault-tolerant, fail-safe software and systems

The Humane Society of the United States

Updating a GoDaddy Website with rsync

Though GoDaddy.com hosting supports commandline access via SSH including use of scp and sftp commands, it does not support rsync.

How do you update a website without rsync?

After much scripting trying to duplicate a small subset of rsync's functionality, I've recently discovered a way to rsync files to a GoDaddy.com website.

With ssh, scp and sftp, GoDaddy.com has all that's necessary on the receiving end to support SSHFS (Secure SHell File System) mounts.

SSHFS is built on the FUSE userspace filesystem and so, if installed on your system, should allow any user to mount devices with it. This lets us transfer files over a secure, encrypted link using rsync since rsync thinks it's doing a local copy from one directory to another. The cp command as well as all of the other Linux utlities are likewise at our disposal.

Here's how I used it on my system...
  1. I created a mountpoint directory
    mkdir /ABCwebsite
  2. Then added an entry to /etc/fstab
    sshfs#user@abcwebsite.com:/home/content/a/b/c/abcwebsite.com /ABCwebsite fuse defaults,_netdev 0 0
  3. Then mounted the remote GoDaddy.com filesystem
    mount /ABCwebsite
  4. Then rsync'ed the desired directory
    rsync -lDz0 /root-of-dir-tree-to-upload /ABCwebsite/dir-to-upload-to

The rsync switches used are...
  • l - Copy symlinks as links instead of copying the file linked to
  • D - Recreate devices
  • z - Zip(compress) files for transfer
  • O - (capital O) Omit setting timestamps
    This prevents the "failed to set times" error that occurs when the owner on the remote website does not have the same user number as the file owner on the local host the files are being sent from, which will always be the case when uploading to GoDaddy.com.


See Also

Labels: , ,

1 Comments:

Blogger Unknown said...

You didn't give it any options to put it into recursive mode like -r or -a.

http://serverfault.com/a/363559/194845

Tuesday, February 11, 2014 7:00:00 AM 

Post a Comment

<< Home