Sat, 07 Jun 2003

More Rsync Fun

As I wrote before, I’ve been using rsync to update my blog entries between my laptop and web host. I finally got around to debugging a problem I had with my previous shell script that allowed me to download a referrer.log at the same time I uploaded my blog entries. It ended up that on second and subsequent uses, the symlink to referrer.log on the webhost got overwritten with the actual file that was on my laptop. So I added an exclusion of *.log going from my laptop to the webhost. Here’s the updated script:


#! /bin/sh
rsync -Cavz -e ssh --delete --exclude="*.log" \
/Users/gvaughn/Sites/gigavolt.net/blosxom/ \
userid@webhost.com:/WebSite/gigavolt/blosxom/

rsync -urptgovLz -e ssh --copy-unsafe-links \
userid@webhost.com:/WebSite/gigavolt/blosxom/ \
/Users/gvaughn/Sites/gigavolt.net/blosxom/ 
In general, if you’re not working directly on your web server, you owe it to yourself to learn about rsync. It’s so much better than ftp for those sorts of synchronizations you’ll want to do on a regular basis.

writebacks

writebacks...

trackback

TrackBack ping me at:

http://gigavolt.net/blog.trackback

comment...

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Save my Name and URL/Email for next time