Summary: Disk copy across servers

From: Jane Rams <janerams_at_hotmail.com>
Date: Mon May 23 2005 - 17:22:15 EDT
Thanks for numerous answers from many people.

ufsdmp/ufsrestore, rsync, tar,dd are some of the tools most recommended.

tar -cf - /directory/to/move | ssh user@otherhost "(cd /destination && tar 
-xvf -)"

find/cpio
NFS mount the source to the destination and use cpio.

For example if the source was mounted to /s0 and the destination
was /opt/tmp:

cd /s0
find . -depth -print | cpio -pvmud /opt/tmp


This should copy everything in /s0

**********
ufsdump 0f - /foo | ssh remote.system cd /bar \; ufsrestore rf -

Remove the restoresymtable file from the remote when you're done.
Use compression with SSH if you have more cycles than bandwidth.

*********
If you have to do it once, and it's the system disk, then
use ufsdump and pipe it to rsh to send it to remote system,
then ufsrestore it on target disk. Check the archives or
use Google to search for something like

   +ufsdump +ufsrestore +rsh

If you will have to do this repeatedly then this is not
a good solution, as rsh is very insecure and really should
be disabled in /etc/inetd.conf .

A better ongoing solution is to install ssh (OpenSSH)
(which requires OpenSSL and Zlib, all are available as
packages on http://www.sunfreeware.com , VERY easy to
install).

Using 'scp -r' can copy the data securely.
*****************
I'd NFS mount the source to the destination and use cpio.
For example if the source was mounted to /s0 and the destination
was /opt/tmp:

cd /s0
find . -depth -print | cpio -pvmud /opt/tmp

This should copy everything in /s0

**********
If you need an exact slice copy then you should consider booting on your 
Sol9 CDrom

ufsdump to a tape each file systems.
On the target machine boot Sol9 Cdrom recreate the same patition table 
through
'format' and restore each file system.

tar cf - fromdir | ( cd todir ; tar xfpv - )
******************
rdist or ufsdump, in my opinion.

**********
I usually use something like:
dd if=/dev/dsk/c0t0d0s2 | ssh me@host dd of=/directory/diskimage



One more thing, if you're copying over a slow network link, add compression 
to the ssh

(-C), or pipe through `gzip -c ` prior to ssh.

**************
It is best to mount the source filesystem readonly.
You must first either mount the source dir onto the dest server or vice 
versa.
# cd <top of source dir>
# tar cpf - . | (cd <dest dir> && tar xpf - )
or
# cd <top of source dir>
# find . -depth -print | cpio -Ppdm <dest dir>

***************
*******
oldserver# ufsdump 0f - /mountpoint | \
  ssh newserver 'cd /new/mount/point && ufsrestore -rf -'
is how I generally do that.

*******
I'd use tar and nfs.

Assuming /disk1 = your mount point.
And /box2/space = your mount point of NFS.

1] cd /
2] tar cvf /box2/space/disk.tar disk1
     or
   tar cvfp /box2/space/disk.tar disk1

379] How do I copy everything from one disk to another using tar? tar cf
- /d2/x2 | tar xf - ; Probably a better method is not to change the
access times: tar cf /d2/x2 | tar xfp -

***************
You have some options, if it's only a few file I use scp. If it's the whole 
disk I

would nfs mount, then cp.

**************
rsync

nfs mount

tar

it really depends on your time frame which is the best.  All three listed 
above will

have an impact on your network that might need scheduling.

***********
you can do rcp -r  or cpio with an rsh piped to cpio, you can do the same
with ufsdump too.

********
You didn't qualify what 'best' is for you.
Personally, I'd use tar over an ssh connection.

Assuming you want to copy from hostA to hostB, that the recipient disk
has a valid, empty filesystem mounted in /foo, and that the source disk
is mounted as /bar, the following should work.

on hostA:

cd /bar
/usr/sfw/bin/gtar -cf - . | ssh root@hostB \
	'/usr/sfw/bin/gtar -C /foo -xf -'

(this assumes also that root is allowed to login using ssh)

Not the fastest, but it's secure.

*******



>From: "Jane Rams" <janerams@hotmail.com>
>To: <sunmanagers@sunmanagers.org>
>Subject: Disk copy across servers
>Date: Fri, 20 May 2005 08:35:32 -0500
>MIME-Version: 1.0
>X-Originating-IP: [64.4.51.220]
>X-Originating-Email: [janerams@hotmail.com]
>X-Sender: janerams@hotmail.com
>Received: from 64.4.51.220 by BAY107-DAV13.phx.gbl with DAV;Fri, 20 May 
>2005 13:35:33 +0000
>X-MSMail-Priority: Normal
>X-Mailer: Microsoft Outlook Express 6.00.2900.2180
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
>
>Which is the best way to copy contents of a 36GB disk on to another disk on 
>a remote system?
>
>Both source and targets are Solaris 9 systems.
>
>TIA
>Jane
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Mon May 23 17:22:49 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:47 EST