1 # Bacula client config on the director
3 # This is stored config by a client, collected on the director
5 # @param client The name of the client (relevant for device names, media type names, etc.)
7 # @param storage_address Address of the storage daemon
8 # @param port_sd Port of the storage daemon
9 # @param storage_secret Shared secret between storage and director
10 # @param storage_device_name Device name on the storage daemon for this node's backups
11 # @param storage_media_type_name Media type name on the storage daemon for this node's backupse
12 # @param volume_retention_full how long to keep volumes with full backups
13 # @param volume_retention_diff how long to keep volumes with differential backups
14 # @param volume_retention_inc how long to keep volumes with incremental backups
15 define bacula::director::client_from_storage (
16 Stdlib::Host $storage_address,
18 String $storage_secret,
19 String $storage_device_name,
20 String $storage_media_type_name,
21 String $volume_retention_full = '100 days', # XXX remove defaults
22 String $volume_retention_diff = '50 days', # XXX remove defaults
23 String $volume_retention_inc = '30 days', # XXX remove defaults
25 Stdlib::Host $client = $name,
27 include bacula::director
29 # For historical reasons, we use the same string for
30 # director-internal storage name as we do for mediate
31 # type names. If we ever blow away the catalog and start
32 # again, we should probably pick a different string here
34 $storage_name = $storage_media_type_name
36 # we define this in both bacula::director::client_from_storage and
37 # bacula::director::client and it needs to match.
38 $pool_name = "${bacula::director::pool_name}-${client}"
40 file { "/etc/bacula/conf.d/${client}_storage.conf":
41 content => template('bacula/director/dir-per-client-from-storage.erb'),
44 notify => Exec['bacula-director reload']
47 file { "/etc/bacula/storages-list.d/${client}.storage":
48 content => "${storage_name}\n",
51 notify => Exec['bacula-director reload']