Copy the Directory structure to linux Remote Server using rsync
Package Required : rsync
1. By default rsync available in linux server. if not there please install with yum.
#yum install rsync
2. Copy the directory structure from one linux server to another linux server with out copying the inner files. Please follow the below steps.
3. For example we have two linux server, we want to copy the directory structure '/home' from source to destination server using rsync.
Server1 : 10.200.18.2 - Source
Server2 : 10.200.18.3 - Destination
rsync -a -f"+ */" -f"- *" /home test@10.200.18.3:~
options :-
a --archive
f --filter=RULE
above example copy the only directory structure of '10.200.18.2' /home to 10.200.18.3.
Package Required : rsync
1. By default rsync available in linux server. if not there please install with yum.
#yum install rsync
2. Copy the directory structure from one linux server to another linux server with out copying the inner files. Please follow the below steps.
3. For example we have two linux server, we want to copy the directory structure '/home' from source to destination server using rsync.
Server1 : 10.200.18.2 - Source
Server2 : 10.200.18.3 - Destination
rsync -a -f"+ */" -f"- *" /home test@10.200.18.3:~
options :-
a --archive
f --filter=RULE
above example copy the only directory structure of '10.200.18.2' /home to 10.200.18.3.
No comments:
Post a Comment