Micah Anderson [Tue, 14 Apr 2009 19:56:53 +0000 (15:56 -0400)]
remove the versioncmp function in the rdiff handler. This was a nice attempt to try and support older
puppets, but this functionality has not stabilized yet, 0.24.8 broke versioncmp and there looks like
a new way coming. Its easier to be mean.
Micah Anderson [Wed, 11 Mar 2009 20:54:34 +0000 (16:54 -0400)]
the default value for sshoptions is 'false' and this value ends up getting
set into the rdiff config, so 'sshoptions = false' which results in the
host attempting to connect to a hostname called 'false'.
This change only includes it if the value is not 'false'.
Micah Anderson [Mon, 9 Mar 2009 20:32:28 +0000 (16:32 -0400)]
fix the $when default parameter to use the correct syntax
If when is set to just '01:00' (as it was previously), then backups
will never run due to the time format being specified
incorrectly. Backupninja considers '01:00' to be the day of the week
and every time it wakes up to see if it is time to do a backup it
determines that it is currently not the day "01:00" and so it
shouldn't do a backup now. In otherwords, it will never do a backup at
this rate.
I've filed a bug for this issue, because it probably should at least
let you know that you've failed.
Antoine Beaupre [Thu, 15 Jan 2009 03:42:50 +0000 (22:42 -0500)]
revert part of last commit: the backuptag is really based on the host provided to the rdiff command and the host provided to the sandbox is the fqdn of the server
Antoine Beaupre [Thu, 11 Dec 2008 14:07:15 +0000 (09:07 -0500)]
fix user initialisation. without this i was getting:
Could not retrieve catalog: Puppet::Parser::AST::Resource failed with error ArgumentError: Duplicate definition: User[false] is already defined in file /etc/puppet/modules/backupninja/manifests/server.pp at line 103; cannot redefine at /etc/puppet/modules/backupninja/manifests/server.pp:103 on node alexandria.koumbit.net
also add rsync and rdiff-backup on the backup server to make those methods work out of the box
Micah Anderson [Fri, 5 Dec 2008 22:26:22 +0000 (17:26 -0500)]
Change to the new format required in templates now that scope is no longer availble in templates since
0.24.6:
http://projects.reductivelabs.com/issues/show/1177
Micah Anderson [Mon, 6 Oct 2008 16:42:04 +0000 (12:42 -0400)]
change the default order for the maildir handler to be 99, because
this handler runs continuously its better if all the other handlers
have run before this one is started (such as the rdiff-backup one)
Micah Anderson [Thu, 31 Jul 2008 14:03:16 +0000 (14:03 +0000)]
enable the ability to override if the ssh directory is managed or not, in
situations where there is a system-wide /etc/ssh/authorized_keys directory,
this will likely not be managed by the backupninja module, and managing
it here will result in duplicate definitions
Micah Anderson [Thu, 31 Jul 2008 13:02:28 +0000 (13:02 +0000)]
setup the backupninja module to enable specification of the location
of the ssh authorized_keys directories and files so that if you are
not using the standard location for authorized_keys files
($HOME/.ssh/authorized_keys) and instead using the
/etc/ssh/sshd_config option "AuthorizedKeysFile" you can then specify
where that will be.
For example, if your /etc/ssh/sshd_config has:
AuthorizedKeysFile /etc/ssh/authorized_keys/$u
then you could specify in the rdiff-backup definition the following
parameters:
Micah Anderson [Tue, 3 Jun 2008 16:56:00 +0000 (16:56 +0000)]
add a way to override the automatic tag creation based on hostname
set the backuptag on crabgrass to not use the default one, otherwise
it wont be collected
Micah Anderson [Fri, 30 May 2008 18:03:32 +0000 (18:03 +0000)]
change from installkeys to installkey
when you have two rdiff-backup calls, then the User is a Duplicate
definition, i think the only way to do it is to have a variable that
you can set to turn off user handling (which we make $installuser and
$usermanage be consistant with $installkey and $keymanage), which is
set true by default, but when you have a second rdiff call on a host,
you can set it to false
Micah Anderson [Fri, 30 May 2008 17:43:51 +0000 (17:43 +0000)]
change the backupninja::client::key definition to use the $user variable
change the $host variable to no longer use the $user variable, that way
multiple rdiff's can be instantiated for a particular host, with different
name variables
in order to do that, the class also has to have the $installkeys variable that
can be passed to backupninja::client::key so that the second rdiff instantiation would
set installkeys => false, otherwise there will be an attempt to duplicate the resource
Micah Anderson [Wed, 21 May 2008 22:22:07 +0000 (22:22 +0000)]
create puffin backup ssh auth keys
get rid of the ninjareport directory
configure v.admin's ssh-key auth to kakapo
move v.admin's backups into the /crypt/serverbackups directory on kakapo
setup puffin to do ninjareport
fix backupserver_tag
Micah Anderson [Wed, 21 May 2008 18:33:50 +0000 (18:33 +0000)]
create a new backadmin ssh key
move backup keys into a 'backupkeys' directory
make a ninjareport directory to contain the pieces for ninjareport
move the backupninja::server definition for kakapo into site.pp, including the $backupdir definition
add a backupkeys piece to the backupninja::server module which should install the key
Micah Anderson [Wed, 21 May 2008 16:56:41 +0000 (16:56 +0000)]
I dont like how any of this is done, but it needs to be working again,
and then made better later.
The ninjareport is a pretty bad way of collecting all the backupninja
reports into one email called the 'ninjareport' which contains all the
hosts with backupninja problems, and a notice about any hosts that
haven't reported in for a while.
The way it works is each participating host has a limited command ssh
key installed in /root/.ssh/id_rsa which enables it to rsync its
/var/log/backupninja.log to
ninja@admin:/var/lib/backupninja/reports/$hostname.log. After the
backup runs on the host, it does this rsync.
On v.admin, there is a /var/lib/backupninja/.ssh/authorized_keys which
has the ssh public key part of each host's ssh key, command-limited to
only allow an rsync of their backupninja.log file. There is a cronjob
there that runs once a day and collects new logs and does some basic
figuring and then collects those all into one email.
There are *many* ways that this needs to be improved. From the puppet
side, the approach is all wrong, and there is a lot of dupliacted
configuration that is being done, it needs to be turned into a define
and export and collection needs to be done. The whole thing needs to
be redesigned from the ground up, but I don't have the mental space to
do it right now, and it needs to work :(
Micah Anderson [Tue, 20 May 2008 20:08:35 +0000 (20:08 +0000)]
Some backupninja module updates from anarcat:
Wed Apr 30 16:22:48 EDT 2008 anarcat@koumbit.org
* remove read permissions on backup directory on group so that a sandbox user can't read other people's directories
Wed Apr 30 16:01:53 EDT 2008 anarcat@koumbit.org
* default the sandbox host to local ($fqdn) and depend on the sandbox directory properly
Thu Mar 13 18:49:38 EDT 2008 anarcat@koumbit.org
* create the backup directory along with the user