First off, I've been searching around for several hours trying to find a solution to this issue but haven't come up with anything that meets my parameters so far. I think I'm going to have to try a different approach but I wanted to ask the forum first.
I've got 250GB or so worth of FLAC files I'd like to back up regularly to a USB drive.
The Ubuntu box hosting the files is 7.10 and formatted EXT3. I've got a second drive in there that mirrors the files and is only mounted when backing up via rsync - it's EXT3 as well. The USB drive is FAT32 for compatibility with Windows machines (I'm aware there are EXT3 drivers for Windows but don't want to install that on friend's machines - enough of a hassle to get them to install something that will play FLAC or encode FLAC>MP3).
Everything seems to work fine from EXT3 to EXT3. When going from EXT3 to FAT32, directory modified dates are the time of the operation versus the modified date of the source directories. Individual files at the root or within the subdirectories do have modified dates that match the source
The rsync command I'm using is...
-r recurse into directoriesCode:sudo rsync -rout --verbose --progress /src /dest
-o preserve owner (super-user only)
-u skip files that are newer on the receiver
-t preserve modification times
The first time through everything works fine.
Subsequent times through all files are copied - not just new or changed files.
Options considered and discarded:
Use checksum comparison (-c). Not feasible as it would take way too long.
Use --no switch w/ -O (omit directories from time preservation). It almost seems like it's using the -O switch and I thought explictly asking it not to might help. --no-0 results in an error and rsync doesn't run
use --size-only switch for comparison. This would end up failing to copy modified files when tags are changed (e.g. "Rock" to "Punk" to "Jazz" - all 4 characters thus same filesize)
Interestingly, copying directories/files from EXT3>FAT32 usingsometimes gives you the correct modified date and sometimes doesn't. I haven't tested this enough to come up with a pattern but in my test of copying a directory with two subdirectories (with files inside them) the directory and the first subdirectory copied had the correct modifed date - the second subdirectory had a modified date as of the time of operation.Code:cp -a /src /dest
So that's a bit long-winded but hopefully it helps someone out along the way.
In summary:
I'd like to use FAT32 for easy Windows compatibility on my machine and friend's machines.
I'd like all directories and subdirectories to mirror the modified date of the source.
I don't want all 250GB worth of files copied every time.
I've ruled out checksum comparison due to the overhead (although this may end up taking less time than a full copy - I haven't let it run the whole way through).
I don't want to trust --size-only comparison as it can lead to files not being backed up when they should be.
The key issue appears to be the modified date of directories/subdirectories.
Secondary question: Does anyone know if this works any better under NTFS? I'd be willing to try that route but Gparted doesn't give NTFS as an option on USB drives and I just haven't had time to figure out how to do this and enable automount from the command line - if someone else has had success doing so, that would become a viable option.
If you have a completely different approach, I'd be happy to hear it.
Thanks!



Adv Reply


Bookmarks