torque
2007-Apr-26 01:29 UTC
Need help to rsynch the directory structure only excluding the files from remote to local.
Hi Tim, I tried using the rsync like how you specified in your example and it worked fine. But when I tried it between my UNIX box and a remote server the command would just not complete and give any output whatsoever. This is how I did it: rsync -av --include '*/' --exclude '*' tashaikh@remotebox:/dw/etl/home/ prod/log/ /export/home/tashaikh/auto/log In the above I need to copy the directory structure under log directory on the remote box to the log directory on the local box. Please let me know if I am doing anything wrong or if there is any other method of doing this. Thanks, Tariq. ---------- Forwarded message ---------- From: Daniel.J.B...@Cummins.com Date: Jun 18 2001, 5:38 am Subject: RSync directory structure only To: mailing.unix.rsync Hello, Thanks for the quick response Tim!! I tried using the excludes you mentioned but it doesn't seem to work. Every file still gets copied. I also tried to have the remote machine execute a command to generate a file list but this didn't seem to work either: rsync -av server:`find /dir1/dir2 -type d` dest Anybody have any other ideas? Thanks! Dan Tim Potter <tpot@valinux To: Daniel.J.B...@Cummins.com .com> cc: r...@lists.samba.org Subject: Re: RSyncdirectorystructureonly 06/17/01 18:11 Daniel.J.B...@Cummins.com writes:> Is there a way to use rsync to replicate adirectorystructureonly andnot> the files in thedirectorystructure?Try this: rsync -av --include '*/' --exclude '*' source-dir dest-dir Tim.