1 |
Am Tue, 21 Mar 2017 01:34:04 +0100 |
2 |
schrieb Heiko Baums <lists@××××××××××××.de>: |
3 |
|
4 |
> Am 21.03.2017 um 00:15 schrieb thelma@×××××××××××.com: |
5 |
> > Besides standard "data" backup, if I was to plan for a disaster |
6 |
> > recovery; what to include in a backup system if I was to rebuild a |
7 |
> > new box? |
8 |
> > |
9 |
> > - /etc |
10 |
> > - /var/lib/portage/world |
11 |
> > - /usr/src/linux/.config |
12 |
> > - /var/spool/fax/ (if needed) |
13 |
> > - /var/www/localhost/htdocs/ (if needed) |
14 |
> > - crontab (users and root) |
15 |
> > |
16 |
> > What else did I miss? |
17 |
> |
18 |
> /home (I guess that's what you mean with standard "data" backup) |
19 |
> /usr/local |
20 |
> /root |
21 |
> /usr/share/fonts (if needed) |
22 |
> |
23 |
> Actually I would make a backup of the whole system excluding those |
24 |
> directories: |
25 |
> |
26 |
> lost+found/ |
27 |
> /dev/ |
28 |
> /media/ |
29 |
> /mnt/ (depends) |
30 |
> /proc/ |
31 |
> /run/ |
32 |
> /sys/ |
33 |
> /tmp/ |
34 |
> /var/export/ |
35 |
> /var/run/ |
36 |
> /home/*/.gvfs/ |
37 |
|
38 |
I'm using btrfs with subvolumes: Everything in one filesystem (I have |
39 |
separate subvolumes for non-distribution related data, like /home, |
40 |
or /var/log, /boot etc). |
41 |
|
42 |
This makes backup easy: I simply mount the root subvolume which |
43 |
contains everything under /mnt/btrfs-root and backup this. This |
44 |
automatically excludes the various runtime mounts like /proc or tmpfs, |
45 |
or net mounts. Plus, it preserves the static /dev delivered by the |
46 |
rootfs deployment of your distribution (and also the various .keep |
47 |
files for important mount points). Before backup, I also dump the |
48 |
subvolume list to a text file. |
49 |
|
50 |
You can get something different by bind-mounting your volumes into a |
51 |
directory especially for crafting the backup. Just |
52 |
make /mnt/system-backup and bind mount / and /home there (and other |
53 |
system parts you exported to separate partitions). That way, runtime |
54 |
and network mounts are not visible there and you get a perfect and |
55 |
clean backup without the hassle of creating a pile of unmaintainable |
56 |
and always incomplete (and maybe even error-prone) exclude lists. Then, |
57 |
maybe dump your mounttab or fstab to the backup root before starting |
58 |
the backup process. That way, you can more easily recreate your |
59 |
partitions before you restore, and get back a working fstab without too |
60 |
much thinking. |
61 |
|
62 |
-- |
63 |
Regards, |
64 |
Kai |
65 |
|
66 |
Replies to list-only preferred. |