[ltp] Syncing from TP HDD to USB key

Joel Ebel linux-thinkpad@linux-thinkpad.org
Tue, 18 Oct 2005 09:46:49 -0400


try:
rsync -auv --update /home/blah/ /mnt/usb/backup/
then the other way:
rsync -auv --update /mnt/usb/backup/ /home/blah/

The -u won't overwrite newer files.  No need for unison.  You just have 
to be sure you delete something in both places if you want it gone.

Joel

Bob Alexander wrote:
> I would like to perform a bi-directional syncing of the contents of my 
> USB key with a given directory (in which I could be giving the command 
> line command) with the aim of copying files between the key to the hard 
> disk only where NEWER versions of existing files are to be found.
> 
> Let me explain with an example:
> 
> Key         HDD
> A1          A2
> B2          B1
> C1          D1
> 
> In the above example A2 stands for a newer version of file A (A1 an older).
> 
> In this example I would like to have:
> 
> A2 copied onto A1
> B2 copied onto B1
> 
> but NOT
> C1 to HDD
> 
> and NOT
> D1 to Key.
> 
> Any ideas on the simpler but dependable way of doing this ? An 
> interaction for confirmation would be useful especially if squelchable.
> 
> Thank you very much,
> Bob