include bacula::director
}
+ if $::hostname == 'beethoven' {
+ include bacula::storage
+ }
+
if $::kernel == Linux {
include linux
if $::kvmdomain {
$bacula_director_address = "dinis.debian.org"
$bacula_director_port = 9101
- $bacula_storage_address = "jommeli.debian.org"
+ $bacula_storage_address = "beethoven.debian.org"
$bacula_storage_port = 9103
$bacula_client_port = 9102
+ $bacula_db_address = "danzi.debian.org"
+ $bacula_db_port = 5433
$bacula_backup_path = "/srv/backup.debian.org/bacula"
$bacula_director_secret = hmac("/etc/puppet/secret", "bacula-dir-$hostname")
+ $bacula_db_secret = hmac("/etc/puppet/secret", "bacula-db-$hostname")
$bacula_storage_secret = hmac("/etc/puppet/secret", "bacula-sd-$hostname")
$bacula_client_secret = hmac("/etc/puppet/secret", "bacula-fd-$hostname")
$bacula_monitor_secret = hmac("/etc/puppet/secret", "bacula-monitor-$hostname")
path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
refreshonly => true;
}
+
+ define bacula_client() {
+ # These must be kept in sync with the settings in bacula.pp
+ $bacula_client_name = "${name}-fd"
+ $bacula_client_secret = hmac("/etc/puppet/secret", "bacula-fd-${name}")
+ $client = $name
+
+ file {
+ "/etc/bacula/conf.d/${name}.conf":
+ content => template("bacula/per-client.conf.erb"),
+ mode => 440,
+ group => bacula,
+ notify => Exec["bacula-director restart"]
+ ;
+ }
+ }
+ $allhosts = keys($site::allnodeinfo)
+
+ bacula_client { $allhosts: }
}
--- /dev/null
+class bacula::storage inherits bacula {
+
+ package {
+ "bacula-sd": ensure => installed;
+ }
+
+ service {
+ "bacula-sd":
+ ensure => running,
+ enable => true,
+ hasstatus => true,
+ ;
+ }
+ file {
+ "/etc/bacula/bacula-sd.conf":
+ content => template("bacula/bacula-sd.conf.erb"),
+ mode => 640,
+ group => bacula,
+ notify => Exec["bacula-sd restart"]
+ ;
+ }
+
+ exec {
+ "bacula-sd restart":
+ path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+ refreshonly => true;
+ }
+}
########################################################################
Catalog {
Name = MyCatalog
- dbname = bacula; DB Address = ""; dbuser = "bacula"; dbpassword = "s3kr1t"
+ dbname = bacula;
+ DB Address = "<%= bacula_db_address %>";
+ DB Port = <%= bacula_db_port %>;
+ dbuser = "bacula";
+ dbpassword = "<%= bacula_db_secret %>"
}
########################################################################
--- /dev/null
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+# For Bacula release 5.0.1 (24 February 2010) -- debian 5.0.4
+
+Storage {
+ Name = <%= bacula_storage_name %>
+ SDPort = <%= bacula_storage_port %>
+ WorkingDirectory = "/var/lib/bacula"
+ Pid Directory = "/var/run/bacula"
+ Maximum Concurrent Jobs = 21
+ SDAddress = <%= bacula_storage_address %>
+}
+
+# List Directors who are permitted to contact Storage daemon
+#
+Director {
+ Name = <%= bacula_director_name %>
+ Password = "<%= bacula_storage_secret %>"
+}
+
+
+# To connect, the Director's bacula-dir.conf must have the
+# same Name and MediaType.
+#
+Device {
+ Name = <%= bacula_filestor_device %>
+ Media Type = <%= bacula_filestor_name %>
+ Archive Device = <%= bacula_backup_path %>
+ LabelMedia = yes;
+ Random Access = Yes;
+ AutomaticMount = yes;
+ RemovableMedia = no;
+ AlwaysOpen = no;
+ Maximum Network Buffer Size = 65536
+}
+
+# Send all messages to the Director,
+# mount messages also are sent to the email address
+#
+Messages {
+ Name = Standard
+ director = <%= bacula_director_name %> = all
+}
--- /dev/null
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+# For Bacula release 5.0.1 (24 February 2010) -- debian 5.0.4
+
+Job {
+ Name = "Backup <%= client %>"
+ JobDefs = "Standardbackup"
+ Client = <%= bacula_client_name %>
+}
+
+Job {
+ Name = "Restore <%= client %>"
+ Type = Restore
+ Client= <%= bacula_client_name %>
+ FileSet = "Standard Set"
+ Storage = <%= bacula_filestor_name %>
+ Pool = <%= bacula_pool_name %>
+ Differential Backup Pool = <%= bacula_pool_name %>diff
+ Incremental Backup Pool = <%= bacula_pool_name %>inc
+ Messages = Standard
+ Where = /var/tmp/bacula-restores
+}
+
+# Client (File Services) to backup
+Client {
+ Name = <%= bacula_client_name %>
+ Address = <%= client %>
+ FDPort = <%= bacula_client_port %>
+ Catalog = MyCatalog
+ Password = "<%= bacula_client_secret %>"
+ File Retention = 30 days # 30 days
+ Job Retention = 6 months # six months
+ AutoPrune = yes # Prune expired Jobs/Files
+}
bellini.debian.org: Vincenzo Salvatore Carmelo Francesco Bellini (November 3rd, 1801 - September 23rd, 1835)
bendel.debian.org: Franz Bendel (March 23, 1833 - July 3, 1874)
berlioz.debian.org: Hector Berlioz (December 11th, 1803 - March 8th, 1869)
+ bertali.debian.org: Antonio Bertali (March 1605 - 17 April 1669)
biber.debian.org: Heinrich Ignaz Franz von Biber (August 12th, 1664 - May 3rd, 1704)
bizet.debian.org: Georges Bizet, (October 25th, 1838 - June 3rd, 1875)
blavet.debian.org: Michel Blavet (March 13, 1700 - October 28, 1768)
+ boiti.debian.org: Arrigo Boito (February 24th, 1842 - June 10th, 1918)
brahms.debian.org: Johannes Brahms (May 7th, 1833 - April 3rd, 1897)
busoni.debian.org: Ferruccio Dante Michelangiolo Benvenuto Busoni (April 1st, 1866 - July 27th, 1924)
chopin.debian.org: Frédéric Chopin (March 1st, 1810 - October 17th, 1849)