Skip to content

Data Synchronization/Backup Headaching

A friend of mine’s recent hard drive catastrophe finally got me around to implementing a decent, cron’ed backup implementation for all the stuff I don’t store in my svn server (mp3s, photos, and other media just don’t change enough to merit the overhead of checking them into a VCS).

RSync would work well, you’d think… Except that I have all this stuff on a fat32 drive (for the rare boot back into windows). And RSync does NOT play well with fat32, and I’m finding.

mote@server1 /media $ rsync -av -e “ssh -l mote” server2:/fat32/data/media/test_dir /media/test_dir

receiving file list … done
created directory /media/test_dir
rsync: failed to set times on “/media/test_dir/test_dir”: Operation not permitted (1)
rsync: mkstemp “/media/test_dir/test_dir/.1.txt.3FfWKE” failed: Operation not permitted (1)
rsync: mkstemp “/media/test_dir/test_dir/.2.txt.IT6nr2” failed: Operation not permitted (1)
rsync: failed to set times on “/media/test_dir/test_dir”: Operation not permitted (1)

sent 56 bytes received 212 bytes 21.44 bytes/sec
total size is 22 speedup is 0.08
rsync error: some files could not be transferred (code 23) at main.c(1173)

Google brings up this blog entry dealing with similar troubles. It suggests some rsync workarounds, and looking into FullSync (supposedly rsync with a solution to the fat32 headaches) .
Unison (slick but crashy from what I hear) is also a possible option. (Feature comparison for rsync and unison)

for a quick get-rsync-working thing, “rsync –rvt” works while “rsynv -av” don’t. It’s that damn “-a” that was causing the problems. I’ll still look into unison, though.


  1. Alex Tomlins

    I was having this problem just now, and I found this solution to it:

    Basically: Linux won’t let you set an arbitrary mtime on a file that you don’t own (even if you have write permission to it). On a vfat filesystem everything is owned by the same user (usually root). The solution for me was to mount the filesystem with the uid my user using the uid=username option in /etc/fstab.

    It’s now working well without complaining.

    Hope that helps,

    Posted on 19-Apr-06 at 08:33 | Permalink
  2. mote

    Thanks, Alex! This is great! A quick check shows that mounting as uid=username also gets rid of those warning messages when you copy/move files in the shell from linux filesystems to fat.

    Posted on 19-Apr-06 at 09:57 | Permalink