Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Mar 2000 16:17:43 -0700
From:      Chris Fedde <chris@fedde.littleton.co.us>
To:        "Kevin Oberman" <oberman@es.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Copying partitions 
Message-ID:  <200003052317.e25NHhT32303@fedde.littleton.co.us>
In-Reply-To: Your message of "Sat, 04 Mar 2000 20:32:48 PST." <200003050432.UAA31562@ptavv.es.net> 

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

"Kevin Oberman" writes:
 +---------------
 | With the low price of disk drives and the high price of both tape
 | drives and media, I have decided that a disk is the most cost
 | effective backup medium I can buy.
 +---------------

I've been making clones of drives using dd for years.  I've even
used dd to make clones of drives with windows partitions.  If the
geometry of the two drives is identical you can simply use something
like

    dd if=/dev/da0c of=/dev/da1c

to cause drive1 to be a fully bootable and identical copy of drive0.
Obviously, do this in single user mode if drive 0 is mounted.

If you want to insure that the data is mobile to different drive
geometries then you can use any of the file archive commands.  I
prefer pax(1) because it is as flexible as cpio but has a more
rational command line and creates normal tar files (by default).
To mirror hierarchies I usually run

    cd /soure
    pax -rwvpe . /dest

This creates /dest/... with all permissions and attributes identical
to the /source.

Generally I store tar.gz files created using something like

    cd /
    pax -w -X . | gzip > /disk/3/backup/root`date +%Y%m%d.tar.gz`

rather than 'mirroring' partitions.  The tar.gz take up less space and can't
be confused with the "real" hierarchies.

chris
__
Chris Fedde	  <chris@fedde.littleton.co.us>
303 773 9134


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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