2fa7b15aa69d184a13ac23b35decfbf6212f2a91
[mirror/dsa-wiki.git] / input / howto / backup.creole
1 = Debian backup =
2
3 beethoven.debian.org alias backup.debian.org is Debian's backup machine.
4
5 == Backup organisation ==
6
7 {{{/org/backup.debian.org}}} contains two directories, {{{staging}}} and
8 {{{backup}}}.  The latter contains the backup and is organised in directories
9 with date directories that contain all the files from that particular day.  The
10 number of kept copies is configured in files in {{{/etc/da-backup-manager/}}}.
11
12 The {{{/staging/}}} directory is used by the clients, i.e. the .debian.org
13 hosts that have something valuable to backup.  The contents of the particular
14 directories is pushed from root to root@backup.debian.org via rsync via a
15 restricted SSH session based on key-authentication.
16
17 Directories:
18
19 {{{
20   /org/backup.debian.org/staging/
21                                  wiki.debian.org
22                                  cvs.debian.org
23                                  ...
24
25   /org/backup.debian.org/backup/
26                                wiki.debian.org/
27                                                20050909
28                                                20050910
29                                                20050911
30                                                ...
31                                cvs.debian.org/
32                                               20050909
33                                               20050910
34                                               20050911
35                                               ...
36                                  ...
37 }}}
38
39 == Adding new backup directories ==
40
41 * install da-backup on the client
42 * create a crontab that runs da-backup daily at some convenient time
43 * configure the directories in {{{/etc/da-backup}}}
44 * install the public host key of the server with a proper command in
45   puppet {{{modules/ssh/templates/authorized_keys.erb}}} for beethoven.  Do a puppetrun on beethoven.
46   (This might get done automatically eventually.)
47 * configure how many copies of the directory should be kept in
48   {{{/etc/da-backup-manager/}}}
49 * run {{{da-backup -v}}} on the client to see if it all works.
50
51
52 * Backup items should be called {{{<host>/<directory>}}}.
53   Historically we also used {{{services/<servicename>}}}.
54
55 == Consistency checks ==
56
57 * Run {{{sudo -u nagios /usr/lib/nagios/plugins/dsa-check-dabackup-server}}}