Solved

help with rsync on AIX

Posted on 2013-05-10
2
536 Views
Last Modified: 2013-05-10
I would like to copy directory from the source server with the following using rsync:

recursively
ignore symbolic links
skip the file/directory if it is the same on the target server

Can someone please help?
0
Comment
Question by:AIX25
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 39154636
- recursively: the "-r" option. Implied with "-a"

- ignore symlinks: the "--no-links" option. Not implied with "-a"!

- skip if the same: That's the default behaviour anyway. You can additionally instruct rsync to ignore files that are newer on the target server by means of the "-u" option.

So your command should look similar to this:

rsync -a --no-links -u -e "/usr/bin/ssh" /source/dir/ user@target-server:/target/dir

Please note that the trailing slash in the source dir spec tells rsync not to create an additional directory level on the target.

I used "-e /usr/bin/ssh" to  force using the ssh protocol. Please adjust the ssh path if it's different, or replace "ssh" with "rsh" if you don't have ssh installed. The latter requires modifying the .rhosts file on the target to include the source host, however.
0
 

Author Comment

by:AIX25
ID: 39156108
Thank you! I was able to run this over ssh.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question