Gentoo Archives: gentoo-server

From: David Miller <david3d@×××××.com>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] Quick restores
Date: Thu, 01 Dec 2005 17:03:43
Message-Id: 9fd973b60512010901g634a673fg18904f55b83cd7ae@mail.gmail.com
In Reply to: Re: [gentoo-server] Quick restores by Robert Larson
1 The only problem with this approach is that the packages won't contain any
2 custom configurations (/etc/). This of course could easily be accounted for
3 and backed up in a different manner.
4
5 David
6
7 On 12/1/05, Robert Larson <robert@×××××××××.com> wrote:
8 >
9 > On Wednesday 30 November 2005 03:59 pm, A. Khattri wrote:
10 > > We have servers (some Gentoo, some FreeBSD, etc) and we are currently
11 > > using something called flexbackup to make backups that get pulled to a
12 > > central storage server. flexbackup uses dump so it works at the
13 > partition
14 > > level to make backups.
15 > >
16 > > My problem is this: flexbackup cannot be used to backup *part* of a
17 > > filesystem - for example, it makes no sense to backup /usr/portage when
18 > > making a backup of /usr.
19 > >
20 > > Im wondering if anyone has written a script (or maybe there's a tool to
21 > do
22 > > this) that will make binary packages of everything installed on a server
23 > > which can then be used to perform very quick restores in the event of a
24 > > major failure?
25 >
26 > If I understand you correctly, then this may help:
27 > # obtain a list of installed packages
28 > emerge -vep world | grep ^'\[ebuild ' | while read a; do
29 > # extract the package name
30 > pkg=$(echo $a | cut -d']' -f2 | awk '{print $1}')
31 > # build a binary of the package
32 > quickpkg "/var/db/pkg/${pkg}"
33 > done
34 >
35 > This should create binary packages of everything installed on your system
36 > (be
37 > warned that I have not tested this though).
38 >
39 > As well, it may help to have:
40 > FEATURES="buildpkg"
41 > in your make.conf. This way anytime a package is installed it will make a
42 > binary.
43 >
44 > If you keep a backup of your /var/lib/portage/world file, it seems to me
45 > like
46 > you should be able to script installing all of the binaries on a new host.
47 >
48 > I should also mention that gentoo catalyst may be worth looking into on
49 > the
50 > off chance that it may provide you with a solution. You could build your
51 > very own stage and boot/rescue disk. Here is a link to the project site:
52 > http://www.gentoo.org/proj/en/releng/catalyst/
53 >
54 >
55 > HTH,
56 >
57 >
58 > Robert
59 > --
60 > gentoo-server@g.o mailing list
61 >
62 >

Replies

Subject Author
Re: [gentoo-server] Quick restores Matthias Bethke <matthias@×××××××.de>