remote copying

Peter Finlay pfinlay at cadence.com
Wed Jan 22 17:14:39 EST 2003


This was on a tech site but I have never used it:

Robin Hurd 
  16 Dec 2002, Rating 3.83 (out of 5)
  This tip will allow you to copy directory trees without worrying about ownerships, permissions,
  etc. (Note: This command is good for Unixes without a recursive copy command) The FIND
  command will list the files which are then piped into the CPIO command to copy them. Check the
  manual pages of CPIO for an explanation of the options. 

  Code

  # cd 
  # find . | cpio -pVmud

I used this piped tar command to do all mine but you have to su to the user to keep permissions.
You may be able to keep permissions with the right tar flags.

Make sure the user is off ever machine before the auto mount switch.
I do a "du -sk ." before and after as a close check ( the size given to the dir pointer throws it off a little )  the tar dies in broken pipe if there is a syntax error and the log is a way to see how far it goes ( and a record for you when somethings missing )
The date is not in the log but gives you an idea of how long it takes with your network.
The new dir is owned by the user and I su'd to him in his old dir.
Any machine where he has anything left running will keep using the old auto mount till killed and you umount his old home.  I had the users do "df -k ." on all machines first ( .bashrc )

date ; tar cf - . | ( cd /vol0/home4/newuserdir ; tar xvf - ) >& /tmp/logfile.txt ; date

I have a document I can clean up if you like, just email me off line.

Peter Finlay

Cadence Design Systems
Lowell, MA 01851
pfinlay at Cadence.COM
W 978.441.4366

-----Original Message-----
From: Robert Casey [mailto:rcasey at ll.mit.edu] 
Sent: Wednesday, January 22, 2003 2:44 PM
To: gnhlug-discuss at mail.gnhlug.org
Subject: remote copying


Good afternoon all,

	can someone tell me the best method to copy files from a auto mounting 
home directory, which comes from a Solaris box, to a linux box. I'm 
setting up a server on Dell Poweredge 4600 running Linux 7.3 which, 
when finished, will be where most if not all of our exports will come 
from. Right now we have cross mounting issues because virtually all of 
our Suns export a directory - some auto mounting and some through 
vfstab entries. I would like to do this copy and keep permissions if 
possible. I will start with my own home directory which comes from a 
host named g32s2s and copy it to our Dell Linux server and then change 
the auto mounting database to reflect those changes.

Bob


Robert Casey
MIT Lincoln Laboratory
244 Wood Street
Lexington, MA 02420-9108
781-981-3034

_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss at mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss



More information about the gnhlug-discuss mailing list