Gentoo Archives: gentoo-server

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

Replies

Subject Author
Re: [gentoo-server] Quick restores David Miller <david3d@×××××.com>
Re: [gentoo-server] Quick restores "A. Khattri" <ajai@××××.net>