Red Hat Topics - duplicating file structure to remote machine

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Topics > March 2005 > duplicating file structure to remote machine





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author duplicating file structure to remote machine
Rob

2005-03-29, 6:09 pm

I need to copy all files from one redhat box to another remote box while
maintaining appropriate ownership and permissions (perferably along with the
user database). I'd probably have to use scp or sftp to move files. What's
the best way to do this? Thanks!


Kill Bill

2005-03-30, 7:45 am

Rob wrote:
> I need to copy all files from one redhat box to another remote box while
> maintaining appropriate ownership and permissions (perferably along with the
> user database). I'd probably have to use scp or sftp to move files. What's
> the best way to do this? Thanks!


There are plenty of approaches. For example:

1. use tar -czvf <tarball.tgz> <directory> to wrap all the files (or use
tar -cjvf for smaller filesize), then copy over the tarball and extract
it on the remote machine. You have ssh/scp/sftp access, right?
2. use dd and netcat. There is an excellant article on the web that
describes the step-by-step guide for this purpose.
3. use rsync to mirror all the files
4. mount the remote file system with nfs or smbfs then use cp
--preserve=all command.
5. there are even more options if you can take off the hard drive(s) on
one side.

The 1st and 2nd are very easy and all file ownership and permissions are
preserved. The 3rd and 4th can also keep ownships and permissions but
need careful settings.

HTH,

--
NT stands for New Technology. Windowds NT(NT4.x)/2K(NT5.0)/XP(NT5.1)
was built on NT Technology. Anyone understands what "new" means, so
everyone knows M$ Windows NT/2K/XP/Whatever is a *real* innovation.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com