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
|
# File 'modules/profile/manifests/backup/storage/main.pp', line 3
class profile::backup::storage::main {
include profile::backup::storage::common
# Main setup:
# 3 storage devices separated on 2 physical arrays
mount { '/srv/archive' :
ensure => mounted,
device => '/dev/mapper/array1-archive',
fstype => 'ext4',
require => File['/srv/archive'],
}
mount { '/srv/production' :
ensure => mounted,
device => '/dev/mapper/array1-production',
fstype => 'ext4',
require => File['/srv/production'],
}
mount { '/srv/databases' :
ensure => mounted,
device => '/dev/mapper/array2-databases',
fstype => 'ext4',
require => File['/srv/databases'],
}
file { ['/srv/archive',
'/srv/production',
'/srv/databases', ]:
ensure => directory,
owner => 'bacula',
group => 'bacula',
mode => '0660',
require => Class['bacula::storage'],
}
bacula::storage::device { 'FileStorageArchive':
device_type => 'File',
media_type => 'File',
archive_device => '/srv/archive',
max_concur_jobs => 2,
}
bacula::storage::device { 'FileStorageProduction':
device_type => 'File',
media_type => 'File',
archive_device => '/srv/production',
max_concur_jobs => 2,
}
if $::site == 'eqiad' {
bacula::storage::device { 'FileStorageDatabases':
device_type => 'File',
media_type => 'File',
archive_device => '/srv/databases',
max_concur_jobs => 2,
}
} elsif $::site == 'codfw' {
bacula::storage::device { 'FileStorageDatabasesCodfw':
device_type => 'File',
media_type => 'File',
archive_device => '/srv/databases',
max_concur_jobs => 2,
}
} else {
fail('Only eqiad or codfw pools are configured for database backups.')
}
}
|