Gentoo Archives: gentoo-user

From: forgottenwizard <phrexianreaper@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup
Date: Thu, 13 Mar 2008 04:00:39
Message-Id: 20080313034809.GA3667@localhost
In Reply to: Re: [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup by Iain Buchanan
1 On 11:18 Thu 13 Mar , Iain Buchanan wrote:
2 >
3 > On Tue, 2008-03-11 at 23:10 -0500, forgottenwizard wrote:
4 >
5 > define "unneeded". This is highly system dependant, as everyone puts
6 > important files all over the place.
7 >
8 Things I would lose if I backed them up. Doing a prior backup, some
9 files in /proc caused me problems, and rsync refused to delete anything
10 in the following pass.
11 >
12 > from the subject line I assume you want to be able to restore a bootable
13 > system? If so, you may need to back up more than just filesystems.
14 > What about the partition table and the master boot record? You can back
15 > up the mbr to a file by using dd:
16 > $ sudo dd if=/dev/hda of=mbr.img bs=512 count=1
17 > (replace hda with your boot drive).
18 >
19 The table, mbr, and partition table I'm not worried about. Those can be
20 easily repaired (or replaced, depending on how one wants to do it)
21
22 > In terms of Gentoo, you can strip out /var/tmp /usr/portage /home and
23 > possibly /opt. Probably some /var subdirs too like /var/log /var/www
24 > etc and some /usr subdirs like /usr/games /usr/include /usr/src etc.
25 >
26 > I'd say you _need_ /dev /proc and /sys.
27 I'd like to know why. Some of the files in /proc change often, and cause
28 rsync a problem. sys doesn't cause these problems, though.
29 >
30 > If you _really_ want to know for sure, turn on the atimes option in
31 > fstab for all your partions, then reboot and do a bit of stuff (log in,
32 > ssh, etc). Then use `find` to find all files that were accessed.
33 > Something like this:
34 >
35 > * edit /etc/fstab, delete noatime (replacing it with "defaults" if
36 > no other options remain)
37 > * $ touch /var/tmp/reference
38 > * $ shutdown -r now
39 > * log in, look around
40 > * find / -anewer /var/tmp/reference
41 >
42 > The output from the last command will be everything you _need_ to boot.
43 >
44 > Ideally, when backing up /proc /dev and /sys, do so from a cleanly
45 > shut-down system.
46 >
47 > HTH,
48
49 I'm trying to do this with the system booted up, because doing a daily
50 sync like that would be a bit of a pain.
51
52 --
53 gentoo-user@l.g.o mailing list

Replies