Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Backup Question, Preserving Hard Links



On Tue, May 23, 2006 at 11:25:35AM -0400, Kent Borg wrote:
> Date: Tue, 23 May 2006 11:25:35 -0400
> From: Kent Borg <kentborg at borg.org>
> To: discuss at blu.org
> Subject: Re: Backup Question, Preserving Hard Links
> Precedence: list
> 
> On Mon, May 22, 2006 at 05:43:02PM -0400, Kent Borg wrote:
> > I am looking for a way to:
> > [...]
> 
> OK, I don't see a bunch of answers to my "what to use when rsync can't
> handle it"-question.
> 
> Let me try a different question...
> 
> Let's say I have two disk volumes (or directory trees) that exactly
> match in contents--except one has extra files that aren't present on
> the other.  How can I efficiently remove the extra files so the two
> copies really do match?
> 
> 
> Thanks,
> 
> -kb, the Kent who could then at least get rid of the big delete step
> in his current method.
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://olduvai.blu.org/mailman/listinfo/discuss

Try this:

rsync -rltpuv --delete <source> <target>

If your mod time & size are not reliable (already synchronized), then
try adding the "-c" option to use checksums instead.

The "--delete" will remove "extra" files from the target.

Suggestion:  I always do a "dry run" first by adding the "-n" option
to preview what rsync will do -- I sometimes misuse the directory
spec, and the dry run makes that pretty clear.

Bill




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org