) {
include bacula::storage
+ $device_name = "${bacula::storage::filestor_device}-${client}"
+ $media_type_name = "${bacula::storage::filestor_name}-${client}"
+ $directory = "${bacula::storage::backup_path}/${client}"
+
file {
"/etc/bacula/storage-conf.d/${client}.conf":
content => template('bacula/storage/sd-per-client.conf.erb'),
group => bacula,
notify => Exec['bacula-sd restart-when-idle'],
;
- "${bacula::storage::backup_path}/${client}":
+ $directory:
ensure => directory,
mode => '0755',
owner => bacula,
;
}
}
-
##
Device {
- Name = "<%= scope['bacula::storage::filestor_device'] %>-<%= @client %>"
- Media Type = "<%= scope['bacula::storage::filestor_name'] %>-<%= @client %>"
- Archive Device = "<%= scope['bacula::storage::backup_path'] %>/<%= @client %>"
+ Name = "<%= @device_name %>"
+ Media Type = "<%= @media_type_name %>"
+ Archive Device = "<%= @directory %>"
LabelMedia = yes;
Random Access = Yes;
AutomaticMount = yes;