Solved

help with rsync on AIX

Posted on 2013-05-10
2
530 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
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

839 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