Gentoo Archives: gentoo-desktop

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-desktop@l.g.o
Subject: [gentoo-desktop] Re: Backup
Date: Sat, 13 Nov 2004 11:13:24
In Reply to: [gentoo-desktop] Backup by Ron Petch
Ron Petch posted <41965D90.5030404@××××××××××××××××.au>, excerpted below,
on Sat, 13 Nov 2004 19:16:32 +0000:

> Any simple suggestion as to how to backup Gentoo? A complete tar bz2 > gives about 2.5Gb. What are the essentials to avoid having to go through > the whole compilation sequence?
If your objective is simply to avoid the recompilation, not to save any customized configuration, use portages binary package feature. First, quickpkg every package currently installed (here, I whipped up a little script that went thru /var/db/pkg (the portage 2.0.51 location) and ran quickpkg for each file), to get your current base, then add buildpkg to your FEATURES line in make.conf. That way, every package you emerge will automatically have a binary package created in the process. (With buildpkg, emerge actually creates the binary package, then merges it instead of doing a qmerge from the temp install dir. That way, it tests each binary package as it's created so it's known to work when needed later.) Binary packages are stored in the $PKGDIR location as in make.conf, by default /usr/portage/package or some such (mine isn't the default), so ensure you have plenty of room in that partition, or remap it elsewhere by setting that variable. Binary packages can be emerged using the -k or -K switches. (-k uses a binary package if it exists, doing a source emerge if not, while -K uses ONLY binary packages, using an older one if a new one isn't available yet, or yielding an error if there's NO qualifying binary package.) Here, for backup, I actually have four installations, a "working" installation, and a backup, on two drives, a "working" drive and a backup. On each drive, I have duplicate root and /usr partitions, such that if the working partition fails due to a bad update or something, I simply reboot and hand LILO (which I use rather than GRUB) the root=/dev/hda3 parameter instead of letting it use the default hda2. For /usr, I can just umount the failed /usr and mount the backup, if necessary. If the drive fails, or the master boot record gets screwed so it won't boot, I set my BIOS to boot the other drive, which again has a working and a backup partition for both root and /usr. Every so often, when the system is stable, I mirror off my root and /usr partitions to the backup copy. Once or twice a year or if I change file system formats (as I'll likely be doing in a few months when I switch from reiserfs to reiser4), I back up a known stable installation to the working and backup partitions on the backup drive. That's in addition to keeping a copy of my portage partitions (separate partitions for portage, packages, and sources) on each drive, such that I should be able to rebuild from binary packages for the most part, if necessary, as well as copies of /var, /usr/local/ and /home, on each drive. These, however, I only have two copies of, one on the working drive one on the backup, as I don't actually /have/ to have that data to get operational enough to recover it. Oh, I actually have eight copies of my partition tables and fstabs, two each on each of the four root partitions. -- Duncan - List replies preferred. No HTML msgs. "They that can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety." -- Benjamin Franklin -- gentoo-desktop@g.o mailing list


Subject Author
Re: [gentoo-desktop] Re: Backup Hector Pizarro <hpizarro@××××××××××.com>