rsync

Catalyst and Rsync

Catalyst and Rsync don't seem to get along well. That is to say, the built-in development server doesn't notice when rsync changes source files. The upshot is Catalyst won't automatically reload the application on change, and that's just plain annoying.

The solution is to use the --inplace option to rsync. This alters how rsync propagates changes and plays nice with Catalyst.

tags: 

PhotoRec, The Savior of Lost Media

Like any good tool, Rsync can be easily used to destroy your life. In my case it was a typo on the destination directory and use of the "--delete" option. Just like that, my SD card was emptied. Luckily I didn't have too many files on there, as I only recently acquired it, but there I was thinking "boy I wish I had backups of that". The good news is, I found PhotoRec.

tags: 

Sync To Mp3 Player

My friend Hans posted on using rsync with his mp3 player. He came up with pretty much the same thing I did, so I figured not only was it about time to post to my blog again, but I should put up my script which works great for me.

#!/bin/sh

MP3="${HOME}/planetary"
NO="no"
MAYBE="maybe"
USB="/media/usbdisk/podcast"
RSYNC="rsync -vae ssh --delete --delete-excluded --modify-window=1"

case "$1" in
  no)
   ${RSYNC} --exclude-from "${MP3}/${NO}" "${MP3}/" "${USB}/"
  ;;
  maybe)
   ${RSYNC} --exclude-from "${MP3}/${MAYBE}" "${MP3}/" "${USB}/"
  ;;
  *)
   ${RSYNC} "${MP3}/" "${USB}/"
  ;;
esac

sync

I stole the "--modify-window=1" bit from Hans, but the rest I wrote. The reason for the "no" and "maybe" files is that I listen to Coverville which is way too big to fit on my 256MB flash drive. So I only listen to that on my computer and export everything else. I also use it for a video podcast from Ming Tsai and whenever I get really far behind on a podcast.

tags: 

Subscribe to RSS - rsync Subscribe to zmonkey.org - All comments