Migrate from /org to /srv
[mirror/dsa-wiki.git] / input / howto / backup.creole
1 = Debian backup =
2
3 backuphost.debian.org alias backup.debian.org is Debian's backup machine.
4
5 == Backup organisation ==
6
7 {{{/srv/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   /srv/backup.debian.org/staging/
21                                  wiki.debian.org
22                                  cvs.debian.org
23                                  ...
24
25   /srv/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 * configure how many copies of the directory should be kept in
45   backuphost's {{{/etc/da-backup-manager/}}}
46 * run {{{da-backup -v}}} on the client to see if it all works.
47
48
49 * Backup items should be called {{{<host>/<directory>}}}.
50   Historically we also used {{{services/<servicename>}}}.
51
52 == Consistency checks ==
53
54 * Run {{{sudo -u nagios /usr/lib/nagios/plugins/dsa-check-dabackup-server}}}
55
56 == Restoring specific files ==
57
58 * Login to the bacula director {{{dinis.debian.org}}}
59 * run {{{sudo bconsole}}}
60 * Use the {{{restore}}} command
61 * Choose "find the job ids of the most recent backup for a client" (9)
62 * Choose the server
63 * Choose "enter a list of directories to restore for found job ids" (11)
64 * Login to the server
65 * Look at the files in {{{/var/tmp/bacula-restores/}}}
66 * Clean up the files in {{{/var/tmp/bacula-restores/}}}