1 # Bacula storage configuration for a client.
3 # This is stored config by a client and then collected on the storage
5 # @param director_server director for this client
6 # @param client name/address of the client (relevant for device names, media type names, etc.)
7 define bacula::storage::client(
8 String $director_server,
9 Stdlib::Host $client = $name
11 include bacula::storage
13 $device_name = "${bacula::storage::filestor_device}-${client}"
14 $media_type_name = "${bacula::storage::filestor_name}-${client}"
15 $directory = "${bacula::storage::backup_path}/${client}"
18 "/etc/bacula/storage-conf.d/${client}.conf":
19 content => template('bacula/storage/sd-per-client.conf.erb'),
22 notify => Exec['bacula-sd restart-when-idle'],
32 # enable the director to make (client, storage) specific configuration
33 @@bacula::director::client_from_storage { $client:
34 tag => "bacula::to-director::${director_server}",
36 storage_address => $bacula::storage::storage_address,
37 port_sd => $bacula::storage::port_sd,
38 storage_secret => $bacula::storage::storage_secret,
39 storage_device_name => $device_name,
40 storage_media_type_name => $media_type_name,