Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to let rsync only copy over the directories on destination side?

Reply
Thread Tools Display Modes

How to let rsync only copy over the directories on destination side?

 
 
linq936@hotmail.com
Guest
Posts: n/a

 
      06-07-2007, 10:58 PM
Hi,
Here is how I am using rsync to copy some large file set remotely:

rsync -azv --delete /remote_dir/ .

The problem is there are a lot of sub-directories I do not need, so
each time after the rsync is done, I need to manually trim them away.

Is there a way to tell rsync only to copy over the sub directories
which are under the destination path?

What I mean is, let us say here are the source and destination
directory trees:

src_tree: /remote_dir/1, /remote_dir/2, /remote_dir/3
dst_tree: ./1, ./3/33

I only want to copy over 1/ and 3/33/, not 2/ and any other sub-
directories under 3/.

Thanks.

 
Reply With Quote
 
 
 
 
Chris Davies
Guest
Posts: n/a

 
      06-08-2007, 10:34 AM
(E-Mail Removed) wrote:
> Here is how I am using rsync to copy some large file set remotely:
> rsync -azv --delete /remote_dir/ .


No it's not. Come back with (an illustration of) the real command.


> The problem is there are a lot of sub-directories I do not need, so
> each time after the rsync is done, I need to manually trim them away.


> Is there a way to tell rsync only to copy over the sub directories
> which are under the destination path?


Read the manual page for the -a flag.

Chris
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to exclude MULTIPLE directories in a rsync command ? Matthew Lincoln Linux Networking 10 05-08-2008 06:27 AM
How to get log file for rsync operation? Does rsync also delete remote files? Goran Ivanic Linux Networking 9 05-05-2008 04:58 PM
Does Linux 2.6 support zero-copy on the RX side? Rick Moleres Linux Networking 0 05-10-2006 07:43 PM
rsync *only* files with no namesake on the destination dmorgan1 Linux Networking 1 06-24-2005 11:50 PM
Port 80 Times Out WAN side; works great LAN side; switched ISP =?Utf-8?B?anItbQ==?= Windows Networking 3 01-13-2005 04:21 PM



1 2 3 4 5 6 7 8 9 10 11