On Sun, Jul 02, 2017 at 01:55:09PM -0500, Tim Chase wrote:
> 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
The only problem I have with this is that the way I run rsync, I
create backup copies of any modified file before overwriting and store
those in an archive folder until they are sufficiently old, then
delete. So if I create a .tar or .zip file it will basically move the
old copy and replace with the new copy on every backup, which,
given the size of the archive, takes too long to suit me, besides
eating up available storage too fast.

What I'm actually doing now is similar to what you suggested above,
but I'm creating and updating the zip file directly on the USB flash
drive using zip -FS. So I'm not using rsync for mails, only for
everything else. This seems to be working fine so far, only drawback
being there are no older copies being archived as everything in the
zip file gets synchronized to the filesystem, but that's okay for this
situation.

> 
> - 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])
An interesting suggestion but a little above my head, I fear.

> - 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
> 
> 

Thanks for your and everyone else's input.
-- 
Jason

Reply via email to