mirror of
https://github.com/krislamo/pup-tests
synced 2025-09-08 07:49:28 +00:00
Added a basic Amanda configuration
Created a new backup virtual machine server called "backups" with a simple configuration using the Getting Started with Amanda tutorial. README also updated to reflect new workflow.
This commit is contained in:
@@ -2,6 +2,7 @@ forge "http://forge.puppetlabs.com"
|
||||
|
||||
# Custom
|
||||
mod 'wordpress', local: true
|
||||
mod 'amanda', local: true
|
||||
|
||||
# Forge Mods
|
||||
mod 'puppetlabs-apache', '4.0.0' # Supported
|
||||
|
@@ -2,3 +2,7 @@ node 'webserver' {
|
||||
include wordpress
|
||||
}
|
||||
|
||||
node 'backups' {
|
||||
include amanda
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,51 @@
|
||||
class amanda {
|
||||
|
||||
# Install Amanda
|
||||
package { ['amanda-server','amanda-client','amanda-common']:
|
||||
ensure => present
|
||||
}
|
||||
|
||||
# Enable "backup" user account
|
||||
user { 'backup':
|
||||
ensure => present,
|
||||
shell => "/bin/bash"
|
||||
}
|
||||
|
||||
# Create important Amanda directories
|
||||
file { ['/etc/amanda','/etc/amanda/MyConfig','/amanda',
|
||||
'/amanda/vtapes','/amanda/holding','/amanda/state']:
|
||||
ensure => directory,
|
||||
owner => "backup"
|
||||
}
|
||||
|
||||
# Create vtape directories
|
||||
file { ['/amanda/vtapes/slot1','/amanda/vtapes/slot2',
|
||||
'/amanda/vtapes/slot3','/amanda/vtapes/slot4']:
|
||||
ensure => directory,
|
||||
owner => "backup"
|
||||
}
|
||||
|
||||
# State directories
|
||||
file { ['/amanda/state/curinfo',
|
||||
'/amanda/state/log',
|
||||
'/amanda/state/index']:
|
||||
ensure => directory,
|
||||
owner => "backup"
|
||||
}
|
||||
|
||||
# Backup config
|
||||
file { '/etc/amanda/MyConfig/amanda.conf':
|
||||
ensure => file,
|
||||
content => template('amanda/amanda.conf.epp'),
|
||||
owner => "backup"
|
||||
}
|
||||
|
||||
# Backup locations
|
||||
file { '/etc/amanda/MyConfig/disklist':
|
||||
ensure => file,
|
||||
content => template('amanda/disklist.epp'),
|
||||
owner => "backup"
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,31 @@
|
||||
org "MyConfig"
|
||||
infofile "/amanda/state/curinfo"
|
||||
logdir "/amanda/state/log"
|
||||
indexdir "/amanda/state/index"
|
||||
dumpuser "backup"
|
||||
|
||||
tpchanger "chg-disk:/amanda/vtapes"
|
||||
labelstr "MyData[0-9][0-9]"
|
||||
autolabel "MyData%%" EMPTY VOLUME_ERROR
|
||||
tapecycle 4
|
||||
dumpcycle 3 days
|
||||
amrecover_changer "changer"
|
||||
|
||||
tapetype "TEST-TAPE"
|
||||
define tapetype TEST-TAPE {
|
||||
length 100 mbytes
|
||||
filemark 4 kbytes
|
||||
}
|
||||
|
||||
define dumptype simple-gnutar-local {
|
||||
auth "local"
|
||||
compress none
|
||||
program "GNUTAR"
|
||||
}
|
||||
|
||||
holdingdisk hd1 {
|
||||
directory "/amanda/holding"
|
||||
use 50 mbytes
|
||||
chunksize 1 mbyte
|
||||
}
|
||||
|
@@ -0,0 +1,2 @@
|
||||
localhost /etc simple-gnutar-local
|
||||
|
Reference in New Issue
Block a user