Help: Make 2 Dirs Identical

Kevin Korb kmk at sanitarium.net
Sun Feb 10 11:17:42 MST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

rsync -vai --exclude=ccc/ --delete /valut/test[12] dest:/store/

On 02/10/13 11:19, Lee Eric wrote:
> Hi mate,
> 
> Thanks for your reply. However, I think there's more common
> scenario I will encounter.
> 
> SRC:
> 
> dir: /vault/test1 file: /vault/test1/aaa file: /vault/test1/bbb 
> file: /vault/test1/ccc dir: /vault/test2 dir: /vault/test3 dir:
> /vault/test4 dir: ... file: ...
> 
> DEST:
> 
> dir: /store file: /store/xxx
> 
> ======>
> 
> Final Result:
> 
> DEST:
> 
> dir: /store dir: /store/test1 file: /store/test1/aaa file:
> /store/test1/bbb dir: /store/test2
> 
> So how do you use rsync to finish this part? Thanks.
> 
> Eric
> 
> On Sun, Feb 10, 2013 at 11:54 PM, Justin T Pryzby 
> <justinp at norchemlab.com> wrote:
>> If you really want to exclude /vault/test1/ccc, and for
>> /vault/test2 to end up at /store/test2, then I would suggest:
>> 
>> rsync -avz --exclude /test1/ccc src:/vault/ dest:/store rsync
>> -avz src:/vault/test2 dest:/store
>> 
>> that runs rsync over ssh.
>> 
>> Note that the trailing slash on the "src" argument in the first 
>> command is significant.
>> 
>> You may also want to run with --del (for delete).
>> 
>> Justin
>> 
>> On Sun, Feb 10, 2013 at 11:24:38PM +0800, Lee Eric wrote:
>>> Hi,
>>> 
>>> I have 2 servers. One is data source I call is SRC and another
>>> one is for DEST data receive, DEST. Here's what I need to
>>> accomplish:
>>> 
>>> SRC:
>>> 
>>> dir: /vault/test1 file: /vault/test1/aaa file:
>>> /vault/test1/bbb file: /vault/test1/ccc dir: /vault/test2
>>> 
>>> DEST:
>>> 
>>> dir: /store file: /store/xxx
>>> 
>>> ======>
>>> 
>>> Final Result:
>>> 
>>> DEST:
>>> 
>>> dir: /store dir: /store/test1 file: /store/test1/aaa file:
>>> /store/test1/bbb dir: /store/test2
>>> 
>>> Could anyone tell me how to accomplish that?
>>> 
>>> Thanks very much.
>>> 
>>> Eric -- 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
>>> 
>> -- 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

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
	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)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlEX5EYACgkQVKC1jlbQAQeeqQCffrh2gZb6WQvDFYZNNg0VXoYR
XA0AoPhPAJ7MhqXe+Fvz7udMKBak7rE5
=jsQ0
-----END PGP SIGNATURE-----


More information about the rsync mailing list