On 2017-06-27 10:00, Jason wrote: > I use rsync for doing incremental backups to a USB stick. I am > having a problem that rsync does not like backing up my mutt emails > since they contain a colon in the filename. For example: > > 1498570870.M370636P2743Q2R5bbb999d0aefc481.net1:2,S > > Using fat32 format on the USB stick may be part of the problem but I > don't want to change to a different format for other reasons. > > What is the best way to backup these emails or how do others handle > this?
A little late to this game, but a couple other ideas occur to me: - back up to a .tar file (or maybe a .zip file?) instead of directly to the file-system. That way, a DOS-acceptable .tar (or .tgz) filename exists in the FAT partition, while its contents contain filenames containing colons. This (to the best of my knowledge) doesn't take advantage of any rsync linking/deduplication your script may be doing - create a file such as "mail.img" on your FAT partition, format it as something smarter (e.g. ext{2,3,4}, UFS or ZFS), and mount it as a loop-back/memory-disk, to which you can then use rsync to that loopback device. This allows for actual sym-links and hard-links which rsync can use for deduplication (using the --link-dest option[1]) - reformat the USB drive as something smarter than FAT (whether ext{2,3,4}, UFS, ZFS, or maybe NTFS?). This does come with the disadvantage of being harder to read on Windows (though I've seen some Windows drivers that allow you to mount EXT2 partitions under Windows) but would ameliorate all your other issues. Given the (un)reliability of USB drives, there's a lot to be said for creating a ZFS pool out of the drive and setting copies=2 to give a better chance at recovery -tkc [1] http://web.archive.org/web/20120429040940/http://www.interlinked.org/tutorials/rsync_time_machine.html