Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Aug 2009 17:09:38 +0100
From:      chris scott <kraduk@googlemail.com>
To:        Polytropon <freebsd@edvax.de>
Cc:        PJ <af.gourmet@videotron.ca>, Bill Moran <wmoran@potentialtech.com>, freebsd-questions@freebsd.org
Subject:   Re: boot sector f*ed
Message-ID:  <d36406630908110909g1cc862d8p371aea9dfed056be@mail.gmail.com>
In-Reply-To: <20090811175229.8c3eb361.freebsd@edvax.de>
References:  <4A816EC9.7070408@videotron.ca> <20090811092214.e38fd90c.wmoran@potentialtech.com> <4A817355.20006@videotron.ca> <20090811175229.8c3eb361.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/8/11 Polytropon <freebsd@edvax.de>

> On Tue, 11 Aug 2009 09:34:13 -0400, PJ <af.gourmet@videotron.ca> wrote:
> > I've got another disk about the same size on the machine and I'm
> > wonderiing how could I transfer the whole shebang to it?
>
> Maybe an 1:1 copy using dd with a bs=1m would work.
>
>
>
> > Would doing a minimum 7.2 install be enough, followed by copying all the
> > slices to the corresponding slices on the new disk?
> > I'm thinking of mounting the broken drive on the new one and then
> > copying... does that sound about right?
>
> No. Does not. :-)
>
> The proper way of doing this - or at least ONE of the proper ways -
> is to use the intended tools for this task. These are dump and
> restore.
>
> First of all, you use a FreeBSD live system (such as FreeSBIE) or
> the livefs CD of the FreeBSD OS to run the OS. The goal is: Most
> minimal interaction with the drives.
>
> Let's assume ad0 is your source disk and ad1 the target disk.
>
> You can use the sysinstall tool to slice and partition the target
> disk. You can create the same layout as on the source disk. Of
> course, using tools like bsdlabel and newfs is valid, too. If
> you're done, things go like this:
>
> 1. Check the source.
>
>        # fsck /dev/ad0s1a /dev/ad0s1e /dev/ad0s1f /dev/ad0s1g /dev/ad0s1h
>
>   Add -f (and dangerous -y) if intended.
>
>
>
> 2. You don't mount the source disk. Instead, you first prepare
>   the target disk which you mount. Then you use dump and restore
>   to transfer the data from the unmounted source partition to
>   the mounted target partition.
>
>        # mount /dev/ad1s1a /mnt
>        # cd /mnt
>        # dump -0 -f - /dev/ad0s1a | restore -r -f -
>
>   Keep an eye on where you mount it. Maybe the live system you
>   use already employs /mnt for its own purposes. Create /target
>   instead, or anything else you like.
>
>
>
> 3. After transferting /, continue with /tmp /var /usr and /home.
>
>        # mount /dev/ad1s1a /mnt
>        # cd /mnt
>        # dump -0 -f - /dev/ad0s1a | restore -r -f -
>
>        # mount /dev/ad1s1e /mnt/tmp
>        # cd /mnt/tmp
>        # dump -0 -f - /dev/ad0s1e | restore -r -f -
>
>        # mount /dev/ad1s1f /mnt/var
>        # cd /mnt/var
>        # dump -0 -f - /dev/ad0s1f | restore -r -f -
>
>        # mount /dev/ad1s1g /mnt/usr
>        # cd /mnt/usr
>        # dump -0 -f - /dev/ad0s1g | restore -r -f -
>
>        # mount /dev/ad1s1h /mnt/home
>        # cd /mnt/home
>        # dump -0 -f - /dev/ad0s1h | restore -r -f -
>
>   Of course, triplepluscheck the commands before running them!
>
>
>
> 4. Unmount the target disks.
>
>        # cd /
>        # umount /mnt/home
>        # umount /mnt/usr
>        # umount /mnt/var
>        # umount /mnt/tmp
>        # umount /mnt
>        # sync
>        # halt
>
>   Replace the disks and start using your target.
>
>
>
> > I haven't looked at the broken one yet; I'll have to see what theat
> > 177mg dump was..
>
> Kernel image?
>
>
> --
> Polytropon
> >From Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe@freebsd.org"
>

Dumping is all very well and good. However if you want daily or hourly
backups etc it is very costly. Thats why our in house system at work is
based around rsync and zfs

Basically we rsync the file to the x4500 with ~ 36 TB and then snapshot the
backup. You then have incremental forever. On large systems that dont have
much % change of content the benefits are huge



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