AW: rsync specified directory(ies)

Pletter Thomas T.Pletter at
Wed Jun 18 01:52:05 MDT 2014


sorry, the explanation about "structure of the directories" misses details about the first directory :

the directories include a sequence (sequential/consecutive) number 

>  the structure of the directories are :

> sequence number ( so it must be variable )
>  |      this is the specified directory and also i have to copy the files/directories below
> 000001  |
> 000001/00
> 000001/00/dir1
> 000001/00/dir1/file1
> 000001/00/dir1/file2
> 000001
>         |----- this directory i have to exclude
> 000001/01
> 000001/01/dir1
> 000001/01/dir1/file1
> 000001/01/dir1/file2

> 000002
> 000002/00
> 000002/00/dir1
> 000002/00/dir1/file1
> 000002/00/dir1/file2
> 000002
> 000002/01
> 000002/01/dir1
> 000002/01/dir1/file1
> 000002/01/dir1/file2

So this command works perfect:

rsync -avihz --relative ./*/00 remote_host:/tmp

output :
cd+++++++ 000001/
cd+++++++ 000001/00/
cd+++++++ 000001/00/dir1/
<f+++++++ 000001/00/dir1/file1

this command doesn't  do nothing:
rsync  -aviz --include='*/' --include='*/00' --include='*/00/**' --exclude='*' --prune-empty-dirs . remote_host:/tmp

kind regards

-----Ursprüngliche Nachricht-----
Von: rsync-bounces at [mailto:rsync-bounces at] Im Auftrag von Kevin Korb
Gesendet: Dienstag, 17. Juni 2014 18:46
An: rsync at
Betreff: Re: rsync specified directory(ies)

Hash: SHA1

If you have only one instance of 01 then just use that as the source.
 But you probably have more than one so try:

Or, since you aren't using --delete you could do:
rsync -aviz --relative ./*/00 remote_host:/tmp

On 06/17/2014 09:28 AM, Pletter Thomas wrote:
> Hello,
> i try to copy a specified directory and the according folders and 
> files below to a remote host.
> cd /dir /usr/bin/rsync  -ravz -e ssh --include='*/'
> --include='*/00/*/*' --exclude='*' .  remote_host:/tmp
> i want to copy in these example the directory "00" and the according 
> folders and files below. the structure of the directory is defined by 
> a software and only directory "00" is variable.
> the structure of the directories are :
> 000001 000001/00 000001/00/dir1 000001/00/dir1/file1
> 000001/00/dir1/file2 000001 000001/01 000001/01/dir1
> 000001/01/dir1/file1 000001/01/dir1/file2
> is it possible with rsync ? i tried several options and gets no result
> kind regards
> ______________________________________
> HINWEIS: Alle von Gesellschaften der REWE International AG 
> elektronisch uebermittelten Auskuenfte, Mitteilungen und Erklaerungen 
> sind vertraulich und rechtlich unverbindlich.
> Verpflichtungen von Gesellschaften der REWE International AG beduerfen 
> der schriftlichen Einigung in saemtlichen Vertragspunkten sowie der 
> Unterfertigung durch das vertretungsbefugte Organ. Im Falle einer 
> Fehluebermittlung ersuchen wir um Benachrichtigung sowie um 
> Vernichtung und Beachtung, dass jegliche Form der Verwendung und 
> Weitergabe der Inhalte an Dritte unzulaessig ist.
> NOTICE: All notices, declarations and explanations transferred 
> electronically from REWE International AG companies are confidential 
> and not legally binding. Obligations of  REWE International AG 
> companies arise only when written agreement to all contractual points 
> has been confirmed in writing with the signature of an authorized 
> representative. If this e-mail was sent by mistake, please inform  us 
> immediately. Furthermore we also request you to destroy it and use 
> neither the contents nor disclose them in any manner to third parties.

- --
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at  (work)
	Orlando, Florida		kmk at (personal)
	Web page:
	PGP public key available on web site.
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -

Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options:
Before posting, read:

More information about the rsync mailing list