Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jan 2004 23:23:15 +0100
From:      "Rickard Dahlstrand" <rd@tilde.se>
To:        "Matthew Seaman" <m.seaman@infracaninophile.co.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: automatic dump and restore over
Message-ID:  <041301c3d891$8214bac0$7001010a@nyalaptopen>
References:  <00a301c3d832$16a40c00$7001010a@nyalaptopen> <20040111125114.GC10388@happy-idiot-talk.infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for all the good answers. Just one final question.

Do you think it is at all possible to do this update without rebooting? It =
would save time but I assume that this is impossible.

The reason I thinking of doing it this way is because I need to distribute =
the update on a bootable cd. I need a method that is as failsafe as it can =
be without any user-interaction (Except for turning the power switch).

Thanks, Rickard.

----- Original Message -----=20
From: "Matthew Seaman" <m.seaman@infracaninophile.co.uk>
To: "Rickard Dahlstrand" <rd@tilde.se>
Cc: <freebsd-questions@freebsd.org>
Sent: Sunday, January 11, 2004 1:51 PM
Subject: Re: automatic dump and restore over

On Sun, Jan 11, 2004 at 12:00:12PM +0100, Rickard Dahlstrand wrote:
>=20
> > All the servers is installed with one partition for /, one for /var/. W=
hen I do the initial install I move the /etc to /var/etc and synlink /etc t=
o point at /var/etc. This should make the / partition exactly the same on a=
ll the servers.
>=20
> If you move /etc like this, you'll make the machines so treated
> unbootable.  There's critical stuff in /etc that has to be in the root
> partition for the boot process to be able to find it.
>=20
> > On the reference server (where I do all the upgrades)  I then use dump =
to create a file from the / partition. This file is the zipped and moved to=
 my laptop from installation on all the other servers.
> >=20
> > The laptop is then connected to the same network as the server that nee=
ds upgrading. The laptop is running DHCP, TFTP and NFS services.
> >=20
> > All servers are set to boot using PXE and once I reboot it the server b=
oots an image from the laptop containing a picobsd dist with a modified sta=
rtup script.=20
> >=20
> > This script automatically mounts the hard drive on the server and a dir=
ectory on the laptop containing the dump-file from the reference server. Th=
en it uses restore to write the dump-file over the / partition on the serve=
r.
> >=20
> > After the upgrade is complete I reboot the server without the DHCP serv=
er active and the server should boot using the new / partition.
> >=20
> > Can this work? I have read that dump/restore is the best solution for b=
acking up disks. Could there be any problems using restore on a partition a=
lready allocated?
>=20
> It strikes me as a lot more complicated than the recommended method,
> which is to designate one machine as a 'build box', where you build
> all of the OS and kernels you need.  You then NFS export /usr/src and
> /usr/obj and mount them on the machine you want to update.  Then you
> can use 'make installkernel', 'make installworld' and 'mergemaster' to
> do the update.  Possibly with a few other steps here and there -- for
> full instructions start with:
>=20
>     http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/small-lan.h=
tml
>=20
> However, if you decide to stick with your first idea, then I'd make
> a few changes:
>=20
>     i) Copy the contents of /etc to your /var as a backup.  Leave the
>        original /etc in place on the root partition.  If you're going
>        to be doing this sort of thing regularly, then you can set up a
>        cron(8) job: the net/rsync port will let you do the copies very
>        efficiently.
>=20
>    ii) Before you rewrite your root partition, you should run newfs(8)
>        on it to blank it.  restore(8) can overwrite a populated
>        partition, but it works best given an empty filesystem.
> =20
>   iii) After you've restored your example root partition, copy back
>        the contents of /etc.  Note that this will wipe out any updates
>        to files within /etc which came as part of the upgrade.
>        mergemaster(8) will help you fix things up, or you can be
>        selective about what contents of /etc you actually keep backed
>        up
>=20
> --=20
> Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
>                                                       Savill Way
> PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
> Tel: +44 1628 476614                                  Bucks., SL7 1TH UK



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?041301c3d891$8214bac0$7001010a>