Improve docs.
[wizbackup.git] / README.md
1 Wizbackup is a minimalistic backup system based on rsync and hardlinked
2 snapshots.
3
4 Its main feature is that each backup snapshot is a plain filesystem tree, identical to the
5 original. Theere's no need for a tool to restore and manage backups.
6
7 There are a few downsides to this simple structure:
8  - Backups are uncompressed (unless the underlying filesystem supports transparent complression)
9  - Large files which change every day, such as logs and databases, are duplicated in each snapshot,
10    wasting space. Reflinks (aka COW-links) would solve this.
11
12
13 Setup
14 =====
15
16 List the hosts to be backed up:
17
18 ```
19 mkdir -p /backup/HOSTS
20 cat >/backup/HOSTS/example <<__EOF__
21 host1.example.com
22 host2.example.com
23 __EOF__
24 ```
25
26 Optionally, specify paths to be excluded from backups:
27
28 ```
29 mkdir -p /backup/EXCLUDE
30 cat >/backup/EXCLUDE/ALWAYS <<__EOF__
31 /dev/
32 /mnt/
33 /proc/
34 /sys/
35 /selinux/
36 __EOF__
37 ```
38
39 You can also specify host-specific excludes:
40
41 ```
42 cat >/backup/EXCLUDE/host1.example.com <<__EOF__
43 /var/cache
44 __EOF__
45 ```
46
47 Install the wizbackup cronjob:
48
49 ```
50 cat >/etc/cron.daily/wizbackup <<__EOF__
51 #!/bin/bash
52 wizbackup-driver /backup/HOSTS/example /backup
53 __EOF__
54 ```
55
56 Create an ssh keypair for each host:
57
58 ```
59 mkdir -p /etc/wizbackup
60 ssh-keygen -N '' -c "wizbackup@example.com" -f /etc/wizbackup/ssh_id
61 ssh-copy-id -f /etc/wizbackup/ssh_id.pub root@host1.example.com
62 ssh-copy-id -f /etc/wizbackup/ssh_id.pub root@host2.example.com
63 ```
64
65 That's it!