Cool stuff you can do with ssh and fuse

fuse over ssh rocks, as we all know. It allows you to mount remote filesystems anywhere you reach with SCP or SSH. But wait – there’s more!

Run commands on the filesystems of hosts you don’t control

I needed to use rsync on a host I don’t control (godaddy, in this case). So I used fuse to remotely mount the godaddy filesystem and then used rsync to do a local copy.

sshfs -C  godaddyuser at godaddyhostname.org:/var/... ~/godaddy/
rsync -auvz --delete-excluded ~/godaddy/ ~/godaddy-copy/

I also created a git repo on that remote godaddy fuse mount – I feel naked without source control.

cd ~/godaddy/ && git init

just like working directly on the machine – except slower because of the network overhead.

4 thoughts on “Cool stuff you can do with ssh and fuse

  1. I feel like copying Jame’s comment. I had the same problem and your solution was just what I needed. Well actually I’d prefer to just use rsync native on godaddy. :)

  2. So I might have praised it early. :) It ended up locking up in the middle and I had to kill sshfs. As it was doing it, I was wondering how useful this was because it seems rsync has to analyze files on both sides by computing checksum like things, and it might end up doing a lot of needless transfers. I might be wrong.

    In any case, I found a better solution… found an old copy of rsync and just scp’d it up to my user account on godaddy then used the –rsync-path=~/bin/rsync option so it was located on the remote side. Just thought I’d share in case anyone else came looking for a solution.

  3. Godaddy is a huge pain because they reap long-running processes so aggressively. I like your idea of uploading your own rsync. Either way, you need something like rsync that understands the corpus of files to transfer so you can run it multiple times without it “forgetting” where you were at.

Leave a Reply

Your email address will not be published. Required fields are marked *