1 |
* Nganon <nganon+gentoo@×××××.com> wrote: |
2 |
|
3 |
Hi, |
4 |
|
5 |
> My first post on the list. I thought I would start with something that I |
6 |
> started |
7 |
> to think of as 'essential' after losing 90GB of data. Now I have two main |
8 |
> questions in mind: what to and how to back up on gentoo most efficiently. |
9 |
|
10 |
I'm using a little script like that: |
11 |
|
12 |
#!/bin/bash |
13 |
cd /var/backup/blackwidow || exit 1 |
14 |
|
15 |
DATE=`date +%F-%H-%M-%S` |
16 |
|
17 |
rsync --exclude-from /scr/etc/backup-blackwidow.exclude \ |
18 |
-avz blackwidow:/ /var/backup/blackwidow/ROOT \ |
19 |
--backup \ |
20 |
"--backup-dir=/var/backup/blackwidow/BACKUP-$DATE" \ |
21 |
--delete \ |
22 |
--delete-excluded \ |
23 |
--delay-updates \ |
24 |
--progress \ |
25 |
|
26 |
|
27 |
(of course with a carefully maintained exclude file ;-p) |
28 |
This doesnt make a real rotating backup, but stores all files that |
29 |
get overwritten into their own directory (named by the current date). |
30 |
And from time to time, I'm cleaning up the backup volume and look |
31 |
for things that I still might need. |
32 |
|
33 |
For things I'd like to keep an history (eg. /etc) I'm using git, and |
34 |
pushing the repo to a remote server (denying non-fastfoward updates |
35 |
there, so an theorectical highjacker cannot destroy my history) |
36 |
|
37 |
For really long-term backups with bigger content (that might be |
38 |
too big for git), you could also give venti+vac (from plan9port) |
39 |
a try. I'm using it for storing larger media files (videos, etc) |
40 |
in my MediaCloud platform. |
41 |
|
42 |
> 1. Apart from users' home directories and the followings, what should be |
43 |
> backed |
44 |
> up on a gentoo machine? |
45 |
> /etc/portage/ |
46 |
> /root |
47 |
> /var/lib/portage |
48 |
> ...? |
49 |
|
50 |
Depends on how long the recovery may take. For example, if you can |
51 |
afford recompiling world (or have another compatible image somewhere |
52 |
else), you can exclude everything where packages are installed |
53 |
(bindirs, libdirs, /usr/share, etc, etc) - assuming everything's |
54 |
installed by portage. |
55 |
|
56 |
> Though I can find enough space on the external drives, I don't trust them |
57 |
> any more. See above..sigh..(No I recovered about one third of it with |
58 |
> testdisk/photorec |
59 |
> which names them as file000001 file00002.. and half them are zero sized.. |
60 |
> which |
61 |
> quite justifies my agony) |
62 |
|
63 |
Make multiple copies on different media (eg. different servers). |
64 |
|
65 |
|
66 |
cu |
67 |
-- |
68 |
---------------------------------------------------------------------- |
69 |
Enrico Weigelt, metux IT service -- http://www.metux.de/ |
70 |
|
71 |
phone: +49 36207 519931 email: weigelt@×××××.de |
72 |
mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 |
73 |
---------------------------------------------------------------------- |
74 |
Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme |
75 |
---------------------------------------------------------------------- |