--compare-dest -- copy ONLY files with content-differences between 2 directories... to a third

John Reye jononanon at googlemail.com
Tue Jan 29 16:13:16 MST 2013


Hello,

thanks for the reply, but I must confess: I don't understand it.

How would I go about using rsync to copy only files with content difference
between folder new and old (or existance-only in folder new)... from folder
new to a third folder new_archive...
???
along the lines of:


rsync -av  --checksum --delete --progress --stats --compare-dest=../old
new/ new_archive

(I've been trying around with --ignore-times and --size-only... but that
didn't lead anywhere...)

Can this actually be done with rsync?

Thanks,
John


On Wed, Jan 30, 2013 at 12:01 AM, Kevin Korb <kmk at sanitarium.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> With -a you are telling rsync to copy the timestamp difference.  It
> can't set a timestamp on nothing.
>
> On 01/29/13 17:58, John Reye wrote:
> > Hi,
> >
> > I'm having trouble with --compare-dest, to copy only files that
> > differ in content.
> >
> > Here are the commands used thusfar: rsync -av  --checksum --delete
> > --progress --stats --compare-dest=../old new/ new_archive
>
> > rsync -av --checksum --delete  --progress --stats --compare-dest=../new
> old/
> > old_archive
> >
> > old/ a.txt
> >
> > new/ a.txt
> >
> >
> > Note: both a.txt are the same (except for a different timestamp).
> > a.txt contains just 2 characters: 'a' and '\n'
> >
> > Now the problem: In the output I see a.txt get copied!!!
> > old_archive/ a.txt
> >
> > new_archive/ a.txt
> >
> > I do NOT want this! Why is a.txt getting copied, when it is
> > identical in its content?
> >
> > Please can you help, so that only files that DIFFER IN CONTENT
> > ONLY... get copied.
> >
> > Thanks. John
> >
> >
> >
>
> - --
> ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
>         Kevin Korb                      Phone:    (407) 252-6853
>         Systems Administrator           Internet:
>         FutureQuest, Inc.               Kevin at FutureQuest.net  (work)
>         Orlando, Florida                kmk at sanitarium.net (personal)
>         Web page:                       http://www.sanitarium.net/
>         PGP public key available on web site.
> ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.19 (GNU/Linux)
>
> iEYEARECAAYFAlEIVK4ACgkQVKC1jlbQAQer5QCg6Ix01H91OwdlF5ufuyrhdlYh
> lScAoL2TRkes039e0W5PQ7KPxrMPsgYB
> =Vl75
> -----END PGP SIGNATURE-----
> --
> Please use reply-all for most replies to avoid omitting the mailing list.
> To unsubscribe or change options:
> https://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20130130/593780a4/attachment.html>


More information about the rsync mailing list