Re: automatic dump and restore over
From: Rickard Dahlstrand (rd_at_tilde.se)
Date: 01/11/04
- Previous message: Mike Maltese: "Re: Other ways than quotas to limit mail files size ??"
- In reply to: Matthew Seaman: "Re: automatic dump and restore over"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "Matthew Seaman" <m.seaman@infracaninophile.co.uk> Date: Sun, 11 Jan 2004 23:23:15 +0100
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 -----
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:
>
> > All the servers is installed with one partition for /, one for /var/. When I do the initial install I move the /etc to /var/etc and synlink /etc to point at /var/etc. This should make the / partition exactly the same on all the servers.
>
> 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.
>
> > 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.
> >
> > The laptop is then connected to the same network as the server that needs upgrading. The laptop is running DHCP, TFTP and NFS services.
> >
> > All servers are set to boot using PXE and once I reboot it the server boots an image from the laptop containing a picobsd dist with a modified startup script.
> >
> > This script automatically mounts the hard drive on the server and a directory on the laptop containing the dump-file from the reference server. Then it uses restore to write the dump-file over the / partition on the server.
> >
> > After the upgrade is complete I reboot the server without the DHCP server active and the server should boot using the new / partition.
> >
> > Can this work? I have read that dump/restore is the best solution for backing up disks. Could there be any problems using restore on a partition already allocated?
>
> 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:
>
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/small-lan.html
>
> However, if you decide to stick with your first idea, then I'd make
> a few changes:
>
> 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.
>
> 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.
>
> 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
>
> --
> 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
_______________________________________________
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"
- Previous message: Mike Maltese: "Re: Other ways than quotas to limit mail files size ??"
- In reply to: Matthew Seaman: "Re: automatic dump and restore over"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|