]> gitweb.fluxo.info Git - puppet-backupninja.git/commitdiff
Merge branch 'multi-backup'
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>
Thu, 7 May 2015 17:59:28 +0000 (13:59 -0400)
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>
Thu, 7 May 2015 18:00:00 +0000 (14:00 -0400)
Conflicts:
README

See merge request !5

1  2 
README
manifests/rdiff.pp

diff --cc README
index f459061c58a78498500d02a3dae7f75d157569fc,94ad952762e2a28c95e2df6f30622fb029b462a4..e8cef4d647e6b5b515070917c17d1cfbb54af62b
--- 1/README
--- 2/README
+++ b/README
@@@ -8,33 -8,38 +8,56 @@@ backupninja
  
  If you were previously using this module, some pieces have changed,
  and you need to carefully change your use of them, or you will find
- your backups could stop working.
 -your backups to be duplicated on your backup server. The important
 -part that changed has to do with the rdiff-backup handler, if you
 -weren't using that, you don't need to worry.
 -
 -If you were, you will need to make sure you change all of your
 -"$directory" parameters to be "$home" instead, and on your
 -backupserver you will need to move all of your backups into
 -"$home"/rdiff-backup. Previously, they were put in "$directory", which
 -doubled as the home for the user that was created. This caused
 -problems with rdiff-backup because of dot files and other things which
 -were not part of any rdiff-backup.
++your backups could stop working or get duplicated.
 +
 +The backupninja::client class has been renamed to backupninja, and is
 +now *required* in all node manifests. Make sure the backupninja class
 +is now declared in all your node manifests! This new class now defines
 +defaults which were previously provided by backupninja::client::defaults,
 +and can now be overridden thanks to the brand new technology of class
 +parameters. This class also manages the backupninja configuration file,
 +replacing the backupninja::config ressource.
 +
 +The backupninja::server class now takes parameters, replacing several
 +global variables such as $backupdir, $backupserver_tag and
 +$nagios_server. The $manage_nagios parameter also replaces the
 +$use_nagios global.
 +
 +As for handlers, they don't include the backupninja::client anymore and
- now read several default values from the backupninja base class. Most
- handler declarations shouldn't need any changes.
++now read several default values from the backupninja base class. If you
++were using the rdiff-backup handler, read the following section
++carefully. Other handlers have not changed in any significant way.
 +
- See below for dependencies which have been introduced in this version.
++Changes to the rdiff-backup handler
++-----------------------------------
 +
- Dependencies
++You will need to make sure you change all of your "$directory"
++parameters to be "$home" instead, and on your backupserver you will need
++to move all of your backups into "$home"/rdiff-backup. Previously, they
++were put in "$directory", which doubled as the home for the user that
++was created. This caused problems with rdiff-backup because of dot files
++and other things which were not part of any rdiff-backup.
+ The rdiff resource name is now used as the subdirectory where rdiff
+ backups are sent. This was previously hardcoded to "rdiff-backup", but
+ in order to support multiple rdiff backups per host, we now use the
+ resource name. So if you were using the following resource:
+     backupninja::rdiff { 'main': }
+ You will want to use the following resource:
+     backupninja::rdiff { 'rdiff-backup': }
+     file { '/etc/backup.d/90_main.rdiff': ensure => absent; }
+ Otherwise your backups may be duplicated!
+ Getting started
  ---------------
  
 -First you will need to import the module:
 +This module requires Puppet versions 2.7 and up.
  
 -  import "backupninja"
 +An up-to-date version of the puppet-stdlib module is also required.
  
  Configure your backup server
  ----------------------------
index 6a602ea6cb6de044036750af9f1a89f3b179e0f3,999eb5d8de9bb137dd2259788d61ffe9198dcf2a..74afa8c0172d52c5dce327146c13394d91e9a662
@@@ -26,13 -26,11 +26,13 @@@ define backupninja::rdiff
                 "/home", "/usr/local/*bin", "/var/lib/dpkg/status*" ],
    $vsinclude = false, $keep = 30, $sshoptions = false, $options = '--force', $ssh_dir_manage = true,
    $ssh_dir = false, $authorized_keys_file = false, $installuser = true, $installkey = true, $key = false,
 -  $backuptag = false, $backupkeytype = "rsa", $backupkeystore = false, $extras = false, $nagios2_description = 'backups')
 +  $backuptag = false, $backupkeytype = $backupninja::keytype, $backupkeystore = $backupninja::keystore,
 +  $extras = false, $nagios_description = 'backups')
  {
 -  include backupninja::client::rdiff_backup
 +  # install client dependencies
 +  ensure_resource('package', 'rdiff-backup', {'ensure' => $backupninja::ensure_rdiffbackup_version})
  
-   $directory = "$home/rdiff-backup/"
+   $directory = "$home/$name/"
  
    case $type {
      'remote': {