> -----Original Message-----
> From: Sam Varshavchik
> Sent: Thursday, December 02, 2004 4:43 PM

> >> Or is there another backup method I should be using?
> > 
> > [Mitch says:] You can also tar / gzip or bzip BEFORE you back up - 
> > makes rsync a lot less efficient - but so does windows ;-) 
> > If it's all 
> > you got, that's your best option - another option is to buy 
> > a second 
> > hard disk for the *nix box and use it for your backups.
> 
> I think if you intelligently tar things up, WITHOUT gzipping, 
> rsync should work well -- it should be able to optimize its 
> way past the unchanged, unencrypted, messages in the tar file.
> 
> The trick is to make sure that the files always get tarred up 
> in the same order.  Actually, I think that cpio would work 
> better, since cpio takes the filename list on standard input, 
> which can be sorted.

I'd use this:

cd destdir; rsh soucehost -c \
"cd ~user; touch .Maildir_newdate; \
find Maildir -newer .Maildir_Date -type f -print | cpio -ocB" \
| pax -r -s '/:/~/g'; rsh sourcehost -c \
"cd ~user; mv .Maildir_newdate .Maildir_Date"

You may need to do a "touch -t 197001020000 .Maildir_Date" on the source
host to kick things off, and obviously the rsh may need messing with, but
the basic idea is to use "find" and "-newer" to collect the files that have
been modified more recently than the ".Maildir_date" file, stuff them into
cpio, pipe the output across the net to "pax", and use pax's "-s" command to
modify the file names as they come across (the argument to -s is an "ed"
style substitution command), and then once all that is complete, update the
".Maildir_Date" file.  (The touch... mv thing is necessary to cover files
that arrive during the backup).

Every ":" in every file name will be replaced with a "~".  Going the other
way requires that you don't mind if all "~" characters become ":", but
that's up to you!

Malc.





-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to