README 1.5 KB
Newer Older
Micah Anderson's avatar
Micah Anderson committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
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
}

23
include backupninja::client::rdiff_backup
Micah Anderson's avatar
Micah Anderson committed
24 25 26 27 28 29
backupninja::rdiff { backup_all:
	directory => '/media/backupdisk',
	include => ['/var/backups', '/home', '/var/lib/dpkg/status'],
	exclude => '/home/*/.gnupg'
}

Micah Anderson's avatar
Micah Anderson committed
30
A remote rdiff backup handler:
31 32 33 34 35 36 37 38

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

39 40 41 42 43 44 45 46 47 48
If you include the backupninja::client::rdiff_backup class, you will
get the rdiff-backup package installed automatically, this also works
for the backupninja::client::maildir class (installs needed rsync package)

If you need to specify a specific version of the rdiff-backup, or rsync package, 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"

49 50 51 52
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.

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