PDA

View Full Version : rsync and the iAudio (under Linux)


Glass
12-27-2005, 18:23
Rsync is an amazing tool for mirroring and backing up files. I decided to put it to use for my x5L. I created a Bash script to rsync the files on my hard drive to the iAudio.

iaudio.sh:

#!/bin/sh

MOUNT="/mnt/iaudio"
RSYNC="rsync --delete --modify-window=1 -rtv"

$RSYNC /data/audio/ $MOUNT/music/


This was working well, but it was trasfering all of the files on each sync, not just the changes. I then realized that the fs of the iAudio was vfat. I located an article detailing the issues with vfat and rsync:
http://www.osnews.com/story.php?news_id=9681&page=3

After altering my fstab entry for the iAudio, I solved the problem.

/etc/fstab:

/dev/sda1 /mnt/iaudio vfat shortname=mixed,defaults,noauto 0 0



I love the iAudio, it's a great product. Hopefully this process will improve someone else's experiences with it as well.

atm
12-28-2005, 00:49
So that synchronizes the stuff on your hard dri ve with the stuff on your player? That sounds nifty, unless of course you have music on your player that isn't on your computer. I still might give it a try.

Glass
12-28-2005, 11:51
If using the method above the files that are on the iAudio and not on the hard drive WILL BE DELETED. Remove the --delete option in the rsync command for the files not to be deleted.

rbgkofi
12-29-2005, 01:09
ah... I just reinstalled and was thinking about that. does this update the files when the tags are updated? or does checksumming have to be enabled?

Glass
12-29-2005, 10:54
Yes, it will update the files if tags are changed. Rsync uses the file size and the last modification date/time to determine if a file needs to be copied.

rbgkofi
12-29-2005, 12:00
Thanks for the example and article link man, nice to be able to understand how and why a command works.