Solved

help with rsync on AIX

Posted on 2013-05-10
2
533 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

749 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