1 |
Ron Petch posted <41965D90.5030404@××××××××××××××××.au>, excerpted below, |
2 |
on Sat, 13 Nov 2004 19:16:32 +0000: |
3 |
|
4 |
> Any simple suggestion as to how to backup Gentoo? A complete tar bz2 |
5 |
> gives about 2.5Gb. What are the essentials to avoid having to go through |
6 |
> the whole compilation sequence? |
7 |
|
8 |
If your objective is simply to avoid the recompilation, not to save any |
9 |
customized configuration, use portages binary package feature. First, |
10 |
quickpkg every package currently installed (here, I whipped up a little |
11 |
script that went thru /var/db/pkg (the portage 2.0.51 location) and |
12 |
ran quickpkg for each file), to get your current base, then add buildpkg |
13 |
to your FEATURES line in make.conf. That way, every package you emerge |
14 |
will automatically have a binary package created in the process. (With |
15 |
buildpkg, emerge actually creates the binary package, then merges it |
16 |
instead of doing a qmerge from the temp install dir. That way, it tests |
17 |
each binary package as it's created so it's known to work when needed |
18 |
later.) |
19 |
|
20 |
Binary packages are stored in the $PKGDIR location as in make.conf, by |
21 |
default /usr/portage/package or some such (mine isn't the default), so |
22 |
ensure you have plenty of room in that partition, or remap it elsewhere by |
23 |
setting that variable. |
24 |
|
25 |
Binary packages can be emerged using the -k or -K switches. (-k uses a |
26 |
binary package if it exists, doing a source emerge if not, while -K uses |
27 |
ONLY binary packages, using an older one if a new one isn't available yet, |
28 |
or yielding an error if there's NO qualifying binary package.) |
29 |
|
30 |
Here, for backup, I actually have four installations, a "working" |
31 |
installation, and a backup, on two drives, a "working" drive and a backup. |
32 |
On each drive, I have duplicate root and /usr partitions, such that if the |
33 |
working partition fails due to a bad update or something, I simply reboot |
34 |
and hand LILO (which I use rather than GRUB) the root=/dev/hda3 parameter |
35 |
instead of letting it use the default hda2. For /usr, I can just umount |
36 |
the failed /usr and mount the backup, if necessary. |
37 |
|
38 |
If the drive fails, or the master boot record gets screwed so it won't |
39 |
boot, I set my BIOS to boot the other drive, which again has a working and |
40 |
a backup partition for both root and /usr. |
41 |
|
42 |
Every so often, when the system is stable, I mirror off my root and /usr |
43 |
partitions to the backup copy. Once or twice a year or if I change file |
44 |
system formats (as I'll likely be doing in a few months when I switch from |
45 |
reiserfs to reiser4), I back up a known stable installation to the working |
46 |
and backup partitions on the backup drive. |
47 |
|
48 |
That's in addition to keeping a copy of my portage partitions (separate |
49 |
partitions for portage, packages, and sources) on each drive, such that I |
50 |
should be able to rebuild from binary packages for the most part, if |
51 |
necessary, as well as copies of /var, /usr/local/ and /home, on each |
52 |
drive. These, however, I only have two copies of, one on the working |
53 |
drive one on the backup, as I don't actually /have/ to have that data to |
54 |
get operational enough to recover it. |
55 |
|
56 |
Oh, I actually have eight copies of my partition tables and fstabs, two |
57 |
each on each of the four root partitions. |
58 |
|
59 |
-- |
60 |
Duncan - List replies preferred. No HTML msgs. |
61 |
"They that can give up essential liberty to obtain a little |
62 |
temporary safety, deserve neither liberty nor safety." -- |
63 |
Benjamin Franklin |
64 |
|
65 |
|
66 |
|
67 |
-- |
68 |
gentoo-desktop@g.o mailing list |