Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Sep 1996 11:51:21 -0700
From:      "Michael L. VanLoon -- HeadCandy.com" <michaelv@MindBender.serv.net>
To:        Bruce Bauman <boot@mosquito.com>
Cc:        freebsd-isp@freebsd.org, boot@itchy.mosquito.com (Bruce Bauman)
Subject:   Re: disk-to-disk copy 
Message-ID:  <199609281851.LAA00393@MindBender.serv.net>
In-Reply-To: Your message of Sat, 28 Sep 96 03:21:59 -0400. <199609280721.DAA02418@itchy.mosquito.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

[...]
>gotten (identical) replacement drives. I'd like to copy
>everything (data, partition tables, etc) from the old drives 
>to the new ones. Is there an easy way to do this?
>Nothing jumped out at me from the man pages. I'd rather
>not have to go through disklabel, dump, restore, etc.

If the drives are *exactly* the same, you can use dd from one raw
device to the other (dd <args> -if=/dev/rsd0c -of=/dev/rsd1c) (those
are from memory, so excuse if I messed up the syntax slightly).

If they aren't identical, you will need to put a disklabel on the new
drive, newfs its filesystems, then copy the files.  The most common
way to copy all the data intact is:

    cd /olddir ; tar -cplf . | ( cd /newdir ; tar -xp --unlink --file - )

This will not traverse a mount point (which is what you want), so
you'll have to do / and /usr separately (and any other things you have
mounted that you want to copy.

-----------------------------------------------------------------------------
  Michael L. VanLoon                           michaelv@MindBender.serv.net
        --<  Free your mind and your machine -- NetBSD free un*x  >--
    NetBSD working ports: 386+PC, Mac 68k, Amiga, Atari 68k, HP300, Sun3,
        Sun4/4c/4m, DEC MIPS, DEC Alpha, PC532, VAX, MVME68k, arm32...
    NetBSD ports in progress: PICA, others...
-----------------------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609281851.LAA00393>