1 |
Nganon <nganon+gentoo@×××××.com> writes: |
2 |
|
3 |
> Hello all, |
4 |
> |
5 |
> My first post on the list. I thought I would start with something |
6 |
> that I started |
7 |
> to think of as 'essential' after losing 90GB of data. Now I have two |
8 |
> main questions in mind: what to and how to back up on gentoo most |
9 |
> efficiently. |
10 |
> |
11 |
> 1. Apart from users' home directories and the followings, what should |
12 |
> be backed |
13 |
> up on a gentoo machine? |
14 |
> /etc/portage/ |
15 |
> /root |
16 |
> /var/lib/portage |
17 |
> ...? |
18 |
|
19 |
Wouldn't it be easier to just backup the whole / directory? |
20 |
Excluding /home, /usr/portage and /var/tmp/portage? |
21 |
|
22 |
|
23 |
> 2. Erm..okay, I am gonna say, what magic I want and then ask your way. |
24 |
> I first started making gzipped tar balls as follows: |
25 |
> |
26 |
> tar czpf /media/backups/userA-`date +%Y.%m.%d`.tgz -X |
27 |
> userA-excludelist /etc |
28 |
> |
29 |
> But these can get huge especially for home dirs. I also want safe dvd |
30 |
> copies. |
31 |
> Though I can find enough space on the external drives, I don't trust |
32 |
> them any more. See above..sigh..(No I recovered about one third of it |
33 |
> with testdisk/photorec |
34 |
> which names them as file000001 file00002.. and half them are zero |
35 |
> sized.. which |
36 |
> quite justifies my agony) |
37 |
|
38 |
Okay, but I don't trust DVDs. Although DVD-RAM is quite safe I heard. |
39 |
But external disks are flexible, offer more space, and if you want more |
40 |
security, just use yet another drive, so you are safe even if your main |
41 |
drive and a backup drive fails. |
42 |
|
43 |
I suggest you have a look at rdiff-backup. It gives you a 1:1 copy of |
44 |
the source directory, but also does incremental backups, which are |
45 |
stored (in compressed form) in an additional folder in the destination |
46 |
directory. I would use this at least for things like /etc, where I |
47 |
sometimes might want to retrieve an old version of a file. Similar to |
48 |
your approach with big tar files and small ones containing the |
49 |
increments. |
50 |
|
51 |
I use a script for my backups, which I mentioned here on 2010-05-07, |
52 |
subject 'Snackup'. It optionally creates LVM snapshots so I can make |
53 |
backups from the running system, even if the source directory is |
54 |
altered during the backup. This works on LVM only, though, and also |
55 |
allows the volume to be LUKS-encrypted. It does backups by rdiff-backup, |
56 |
rsync, cp, tar or dd. It may be overkill when not using the LVM |
57 |
features, but still I suggest to use some script for backups, so one |
58 |
does not always have to remember the backup commands. When I want to |
59 |
update my backup, I enter something like 'snackup boot root home src', |
60 |
and the script backs up my boot, root and home partition in the |
61 |
background, and creates tar files each directory in /usr/src. |
62 |
|
63 |
|
64 |
> By the way, since I want dvd backups as well, and I want to use +rw |
65 |
> dvds so I can overwrite old backup after a while, what is best way of |
66 |
> ensuring the integrity and safety of them. Is it a good idea to use |
67 |
> truecrypt containers? Or nothing tops signing and encrypting with gpg? |
68 |
|
69 |
I'd use DVD-RAM. The media is a little more expensive, but AFAIK they |
70 |
were made with long-time backups in mind. And access is much easier, |
71 |
you just copy the files as to an external drive, no need to burn ISOs. |
72 |
|
73 |
Wonko |