Skip to content

Instantly share code, notes, and snippets.

@fvoges
Created April 17, 2017 21:01
Show Gist options
  • Select an option

  • Save fvoges/078701605e575fd612dfdea12067312c to your computer and use it in GitHub Desktop.

Select an option

Save fvoges/078701605e575fd612dfdea12067312c to your computer and use it in GitHub Desktop.
Puppet Enterprise Backup Profile
# requires these modules
# https://github.com/npwalker/pe_databases
# https://github.com/fvoges/puppet-pe_backup
# Profile profile::puppet::backup
class profile::puppet::backup {
$destination = hiera('profile::puppet::backup::destination')
include ::pe_databases::backup
file { $destination:
ensure => directory,
owner => 'root',
group => 'root',
mode => '0750',
}
class { '::pe_backup':
destination => $destination,
prefix => $::facts['networking']['fqdn'],
# include the database dumps fron pe_databases::backup too
dirs_extra => [ $pe_databases::backup::backup_directory, ],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment