public
Description: This module provide a simple way to manage a central backup server based on rdiff-backup
Homepage:
Clone URL: git://github.com/camptocamp/puppet-rdiff-backup.git
name age message
file README Fri Nov 20 02:26:08 -0800 2009 Updated README to mention $rdiff_backup_enable_... [Christian Kaenzig]
directory files/ Wed Dec 02 07:53:01 -0800 2009 rdiff-backup: add class python-dev and buildenv... [Aubort Jean-Baptiste]
directory manifests/ Wed Dec 02 07:53:01 -0800 2009 rdiff-backup: add class python-dev and buildenv... [Aubort Jean-Baptiste]
directory templates/ Fri Nov 20 02:24:48 -0800 2009 Added support for disabling email reporting. [Christian Kaenzig]
README
Introduction/Notes
==================

This module provide a simple way to manage a central backup 
server based on rdiff-backup.

This module is under development !

Usage
=================

node 'central-backup-server' {

  # backup server settings  
  $rdiff_backup_max_threads = 10
  $rdiff_backup_logs_dir = "/var/log/rdiff-backup"
  $rdiff_backup_smtp_server = "localhost"
  $rdiff_backup_enable_mail = 1
  $rdiff_backup_mail_from = "backupserver@domain.com"
  $rdiff_backup_mail_to = "backupmanager@domain.com"

  # copy and modify one of these classes to install another version
  rdiff-backup::server::install { ["0.13.4","1.1.15","1.1.5"]: 
    ensure => present
  }
  # we want to remove one version? ok:
  rdiff-backup::server::install {"1.2.5":
    ensure => absent,
  }

  # args = rdiff-backup arguments (http://www.nongnu.org/rdiff-backup/rdiff-backup.1.html)
  rdiff-backup::conf{$fqdn:
    ensure  => present,
    version => "1.2.5", 
    source  => "/",
    destination => "/backup/${fqdn}",
    args => "--print-statistics --include '/etc' --exclude '/'",
    retention => "5D",
  }

  # collect exported ressources
  Rdiff-backup::Conf <<||>>

  # collect public keys
  Sshkey <<||>>

  file {"/root/.ssh/your_private_key_id_rsa": # the key used in --remote-schema below
    ensure  => present,
    owner   => root,
    group   => root,
    mode    => 600,
    content => "-----BEGIN RSA PRIVATE KEY-----
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
...
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
-----END RSA PRIVATE KEY-----\n",
  }
 
}

node 'one-client-to-backup' {
  
  include rdiff-backup::client # install default package of your distribution

  @@rdiff-backup::conf{$fqdn:
    ensure => present,
    version => "1.2.5", # a fine improvement will be to get rdiff-backup version with a fact
    source => "root@${fqdn}::/",
    destination => "/backup/${fqdn}",
    args => "--remote-schema 'ssh -t -i /root/.ssh/your_private_key_id_rsa %s' --print-statistics --exclude '/proc' 
    --exclude '/dev' --exclude '/mnt' --exclude '/media',
    retention => "30D",
  }

  # export public key of this node
  @@sshkey {"$fqdn": type => rsa, key => $sshrsakey }

  # use ssh-keygen to generate SSH keys without passphrase and put the public key here
  ssh_authorized_key {"multithreaded-rdiff-backup":
    ensure => present,
    type => "ssh-rsa",
    key => "AAAA ... BIwAAAQEA0PPAW==", # your public SSH key
    user => root,
    options => [
      "from=\"124.44.55.66\"", # IP of your central backup server
      "command=\"rdiff-backup --server\"",
      "no-pty",
      "no-port-forwarding",
      "no-X11-forwarding",
    ],
  }

}