Re: Copying files over the Network
From: JOSEPH KREMBLAS (JKREMBLAS_at_REDHEARTGIFTS.COM)
Date: 08/28/04
- Previous message: Vipin Khushu - SuSe: "Re: Copying files over the Network"
- In reply to: Vipin Khushu - SuSe: "Re: Copying files over the Network"
- Next in thread: Hunter, Mark: "Re: Copying files over the Network"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 28 Aug 2004 12:31:11 -0700 To: aix-l@Princeton.EDU
Saturday, August 28, 2004 A.D.
Hi, Vipin,
"Flummoxed?" Nice choice of words :) I had to look this one up
in the dictionary--which means confounded or confused. It appears on its
face that you are using root. As such, when using RCP or RSH as root,
the /etc/hosts.equiv file IS NOT check; instead, authentication for root
is passed to the $HOME/.rhosts file.
Some Notes.--If an /etc/hosts.equiv file does not exist on the
TARGET system, or does exist but does not authorize the USER on the
remote system, then the $HOME/.rhosts file will be looked at for USER
AUTHENTICATION. Make sure that the permissions on the $HOME/.rhosts
file are set correctly, otherwise the authentication process
fails--quite miserably at that. The "permissions" rule applies equally
to the /etc/hosts.equiv file as well. I'll leave it at this and allow
you to research this yourself. If you are still flummoxed, please
advise.
I hope this helps.
Best wishes,
Joseph Kremblas
IBM Certified Advanced Technical Expert--RS/6000 AIX
IBM Certified Specialist--pSeries AIX 5L Systems Support
IBM Certified Specialist--pSeries AIX 5L Systems Administration
IBM Certified Specialist--RS/6000 SP and PSSP
IBM Certified Solutions Expert--WebSphere MQ/MQSeries
IBM Certified Specialist--WebSphere MQ/MQSeries
Phone: (623) 877-5722
"Doubt is a pain too lonely to know that faith is his twin
brother."
All Rights Reserved.
-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On Behalf Of
Vipin Khushu - SuSe
Sent: Friday, August 27, 2004 6:16 PM
To: aix-l@Princeton.EDU
Subject: Re: Copying files over the Network
I'm flummoxed. When I attempt Simon's tar command or Mark Ray's rcp
command, I get Permission Denied in both cases.
.rhosts files on both machines have been updated with the other's host
name.
I have also updated the hosts.equiv files on both machines for good
measure.
Here's what I get when I execute the rcp command:
# rcp -p -r hostnameA:/u/abcd/* hostnameB:/u/abcd
rshd: 0826-813 Permission is denied.
Would one of you please post a sample user, .rhosts, etc set up so I can
configure accordingly.
thanks.
Vipin-
One important consideration is whether you need to clean-up things on
machine B.
e.g. The first time, you copy file1 and file2 from A to B.
When you come to the next copy, file1 has been updated but file2 no
longer exists. Do you need to remove file2 from machine B?
Could files on Machine B be updated, so that they have a later timestamp
than those on machine A? If so, what do you want to happen?
Generally, I would recommend rdist for this. However, if your needs are
relatively simple - if the directory on machine B gets cleared down
before the copy, for example - I'd use a combination of rsh and tar or
backup/restore.
e.g. tar -cf - /your/directory | rsh machineB tar -xf -
This is good, because it preserves modification times as well as
permissions. You can do the same thing with backup/restore, which is
better for large amounts of data and for database files.
Simon Green
Altria ITSC Europe Ltd
AIX-L Archive at https://new-lists.princeton.edu/listserv/aix-l.html
New to AIX? http://publib-b.boulder.ibm.com/redbooks.nsf/portals/UNIX
N.B. Unsolicited email from vendors will not be appreciated.
Please post all follow-ups to the list.
Using rcp ("Remote Copy Procedure"), the syntax would be:
rcp -p -r machineA:/directory/* machineB:/target_directory
The -p flag preserves attributes, while the -r flag recursively descends
and copies
subdirectories and files. To make this a recurring thing, add this line
into your
crontabs. Remember you need a .rhosts file on each machine containing
each
other's hostnames.
Best,
Mark Ray
AIX and TSM Systems Support
New England Gas, Company
-----Original Message-----
From: Vipin Khushu - SuSe [mailto:vkhushu@GUERNSEYOP.COM]
Sent: 26 August 2004 23:14
To: aix-l@Princeton.EDU
Subject: Copying files over the Network
I need to copy the contents of a directory, including sub-directories,
and all files contained in those directories from machine A to machine B
over the network, in a recurring fashion, say once every 24 hours.
The file types include binaries and text files.
I'd like to maintain the permissions of the files as they exist in
machine A.
Any tips, suggested commands, etc would be greatly appreciated.
- Previous message: Vipin Khushu - SuSe: "Re: Copying files over the Network"
- In reply to: Vipin Khushu - SuSe: "Re: Copying files over the Network"
- Next in thread: Hunter, Mark: "Re: Copying files over the Network"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|