OT: cloning (copying) a HD over a network...
Dale Sykora
dalen at czexan.net
Sat Apr 9 08:51:42 UTC 2005
Kim Lux wrote:
> The hard drive is full on our server. I can ssh into it from my
> workstation. I've got a formatted drive mounted on my workstation ready
> to receive the server files.
>
> How do I easily copy the server files to the workstation drive over our
> network ? Keep in mind that I need to preserve the file ownership,
> permissions and dates.
>
> If I had the new hard drive mounted on the server, I would use:
>
> cp -aR /olddrive /newdrive >> logfile
>
> I've tried using scp, but I cannot force it to preserve the file
> attributes.
>
> I've tried using sftp, but I don't think it is recursive and I can't
> force it to preserve attributes.
>
> I'm trying to use tar, but I can't figure out how to make it work across
> a network. FWIW, I have sshd enabled on the server, but not on the
> workstation. I don't have nfs enabled on the server. Can I do this
> without enabling it ?
>
> Any hints would be appreciated.
Kim,
I would use rsync. From the workstation something like the following
should work.
rsync -Pav --rsh=ssh root at your_server:/from_dir/ /to_dir/
replace user, server, from&to paths as appropriate
Thanks,
Dale
More information about the fedora-list
mailing list