Date: Thu, 27 May 2010 09:21:37 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Steve Bertrand <steve@ipv6canada.com> Cc: "questions@freebsd.org" <questions@freebsd.org> Subject: Re: Cloning question Message-ID: <87bpc1yidq.fsf@kobe.laptop> In-Reply-To: <4BFDD9EC.4090801@ipv6canada.com> (Steve Bertrand's message of "Wed, 26 May 2010 22:33:16 -0400") References: <4BFDD9EC.4090801@ipv6canada.com>
index | next in thread | previous in thread | raw e-mail
On Wed, 26 May 2010 22:33:16 -0400, Steve Bertrand <steve@ipv6canada.com> wrote:
> I've written a few "howto"'s on backup/restore/cloning in the past, but
> now I have a question that I hope to have quickly answered.
>
> I'm not looking for criticism on my approach, only on whether it will
> work. With that said, I'll lay out my scenario and my questions.
>
> Scenario:
>
> - live web server (300 domains), shut the box down and booted up a copy
> of the system on new hardware
>
> - changed the normal system items (nic, fstab etc)
>
> - new box is running fine under old system, but I need to transfer the
> old system data (all of it...*all* data) to the new disk sub-structure
>
> - new box has RAID card, but not compatible w/FBSD
>
> - new box has had RAID card disabled, so new disks show up as standard
> adX drives
>
> Questions:
>
> - while running the 'new' box under the 'old' system, can I:
> --- atacontrol create RAID1 ad4 ad6
> --- fdisk
> --- label: to items under /mnt, as to prepare for copy
>
> - stop all services (or go into single-user), and dump each slice from
> orig to new
>
> ...if so, please advise of the dump command that I'd be using.
>
> Normally I'd use rsync, but this situation can sustain some downtime to
> ensure a complete and utter mirror.
If you want to use dump/restore to copy the root partition from ad0s1a
to ad4s1a you can use:
# newfs -L NEWROOT /dev/ad4s1a
# mount -t ufs /dev/ufs/NEWROOT /mnt
# cd /mnt
# dump -0auL -C 32 -f - / | restore -rf -
When this is run in single-user mode, the partiion mounted at /mnt
should have a copy of the root filesystem. Repeat the dump-restore pipe
for other filesystems, e.g.:
# newfs -L NEWDATA /dev/ad4s2a
# mount -t ufs /dev/ufs/NEWDATA /mnt/data
# cd /mnt/data
# dump -0auL -C 32 -f - /data | restore -rf -
# newfs -L NEWHOME /dev/ad4s3a
# mount -t ufs /dev/ufs/NEWHOME /mnt/home
# cd /mnt/home
# dump -0auL -C 32 -f - /home | restore -rf -
...
When you have dumped all your filesystems to properly mounted graft
points under /mnt, update /mnt/etc/fstab and boot the new disk.
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87bpc1yidq.fsf>
