aboutsummaryrefslogtreecommitdiff
path: root/README
blob: 5cec60dbc8d96efb85ba87b72347daf4b70748b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Backupninja Module
-------------------

Configure Backupninja handlers via Puppet.

Simply include backupninja (to make sure you've got the package installed)
then configure backupninja:

backupninja::config { conf:
	loglvl => 3,
	usecolors => false
}

And setup your handlers:

backupninja::mysql { all_databases:
	user => root,
	backupdir => '/var/backups',
	compress => true,
	sqldump => true
}

include backupninja::client::rdiff_backup
backupninja::rdiff { backup_all:
	directory => '/media/backupdisk',
	include => ['/var/backups', '/home', '/var/lib/dpkg/status'],
	exclude => '/home/*/.gnupg'
}

A remote rdiff backup handler:

    backupninja::rdiff { "main":
        host => "backup.example.com",
        type => "remote",
        directory => "/backup/$fqdn",
        user => "backup-$hostname",
    }

To manage the installed backup software, using puppet package
management, you can include the backupninja::client::$backupprogram
class (where $backupprogram is one of: rdiff_backup, maildir,
duplicity). This will get the $backupprogram package installed
automatically, you do not need to include this class, if you wish to
manage the package version some other way, for example:

include backupninja::client::rdiff_backup
include backupninja::client::maildir
include backupninja::client::duplicity

When this class is included, it will make sure that the correct
version that is associated with puppet's 'installed' (or 'present')
parameter is installed. If you need to specify a specific version of
the rdiff-backup, rsync or duplicity packages, you can do so by
specifying the variables:

$rdiff_backup_ensure_version = "1.2.5-1~bpo40+1"
$rsync_ensure_version = "3.0.6-1~bpo50+1"
$duplicity_ensure_version = "0.6.04-1~bpo50+1"

If you do not specify these variables the default 'installed/present'
version will be installed when you include this class. 

If you configure a backupninja::server, it will collect those users
and create them.  We have yet to create proper authorized_keys
management to make that process completely automatic.

At the moment, not all the backupninja handlers are available, they
are relatively easy to add however.

Nagios alerts about backup freshness
------------------------------------

If you set the $nagios_server variable to be the name of your nagios server,
then a passive nagios service gets setup so that the backup server pushes
checks, via a cronjob that calls /usr/local/bin/checkbackups.pl, to the
nagios server to alert about relative backup freshness.

Note: this $nagios_server variable must be set before the class is included.