aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2011-09-23 16:51:17 +0200
committerintrigeri <intrigeri@boum.org>2011-09-23 16:51:17 +0200
commit66703ca1faff3805fbab0af58a2143cc0ffe4d96 (patch)
tree7d78e9da57c7e7b83b9788fd9865091762d53d47
parent2469656db14d4315dfbfc98cc20e81c2cdd0bd96 (diff)
parent47bc20217c04f133c14b168ed15bc715c869c77e (diff)
downloadbackupninja-66703ca1faff3805fbab0af58a2143cc0ffe4d96.tar.gz
backupninja-66703ca1faff3805fbab0af58a2143cc0ffe4d96.tar.bz2
Merge commit 'backupninja-0.9.10' into debian
-rw-r--r--AUTHORS2
-rw-r--r--ChangeLog29
-rw-r--r--README4
-rw-r--r--configure.in2
-rw-r--r--examples/Makefile.am2
-rw-r--r--examples/example.sh2
-rw-r--r--handlers/Makefile.am2
-rw-r--r--handlers/dup.in14
-rw-r--r--handlers/rdiff.helper.in2
-rw-r--r--handlers/rsync.in6
-rw-r--r--handlers/sh.in7
-rw-r--r--[-rwxr-xr-x]handlers/sys.in0
-rw-r--r--man/backup.d.56
-rw-r--r--man/backupninja.14
-rw-r--r--man/backupninja.conf.52
-rw-r--r--man/ninjahelper.12
-rwxr-xr-xsrc/backupninja.in4
17 files changed, 61 insertions, 29 deletions
diff --git a/AUTHORS b/AUTHORS
index d50e69d..a4a5fa5 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -39,3 +39,5 @@ Jordi Mallach <jordi@debian.org> -- do not error when no jobs are configured
Jacob Anawalt <jlanawalt@gmail.com> -- pg_dump format option
Sergio Talens-Oliag <sto@debian.org> -- pipefail fixes
Bruno Bigras <bigras.bruno@gmail.com> -- enable tar handler in the build system
+aihtdikh -- Allow 'when = XXX' with spaces in .sh files.
+Chris Lamb <lamby@debian.org> -- rdiff.helper bugfix
diff --git a/ChangeLog b/ChangeLog
index f4a38f5..feeb8c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+version 0.9.10 -- September 23, 2011
+ backupninja changes
+ . Fix email reports, that were broken by the new locking support.
+ handler changes
+ dup:
+ . Cleanup: stop supporting duplicity < 0.6.01 (Redmine#2538).
+ . Fix incorrect duplicity version check for keepincroffulls.
+ Thanks to Olivier Berger <oberger@ouvaton.org> for the patch.
+ (Closes Redmine bug #3443)
+ (Closes: #641120)
+ ldap:
+ . Don't install LDAP handler, helper and example configuration file.
+ Don't mention LDAP support in documentation.
+ Official LDAP support will come back once this code has found
+ itself a maintainer. Interested? Get in touch!
+ rsync:
+ . Fixing $rsync_options output when rsync is local
+ (Closes Redmine bug #3001)
+ (Closes: #639545)
+ sh:
+ . Allow 'when = XXX' with spaces (Redmine#2769).
+ Thanks to aihtdikh for the patch.
+ sys:
+ . Remove useless and inconsistent executable bit on handler.
+ helper changes
+ rdiff:
+ . Fix infinite loop when version inconsistency is detected.
+ Thanks to Chris Lamb <lamby@debian.org> for the patch.
+ (Closes: #639547)
version 0.9.9 -- May 15, 2011
backupninja changes
. Use locking to avoid running concurrent instances of the same backup
diff --git a/README b/README
index 41d4186..8b138cf 100644
--- a/README
+++ b/README
@@ -27,7 +27,6 @@ Backup types:
incremental data is compressed. permissions are retained even
with an unpriviledged backup user.
- backup of mysql databases (via mysqlhotcopy and mysqldump).
- - backup of ldap databases (via slapcat and ldapsearch).
- basic system and hardware info
- encrypted remote backups (via duplicity).
- backup of subversion repositories.
@@ -92,7 +91,6 @@ file in /etc/backup.d according to the file's suffix:
.rdiff -- filesystem backup (using rdiff-backup)
.dup -- filesystem backup (using duplicity)
.mysql -- backup mysql databases
- .ldap -- backup ldap databases
.pgsql -- backup PostgreSQL databases
.sys -- general hardware, partition, and system reports.
.svn -- backup subversion repositories
@@ -105,7 +103,7 @@ The configuration files are processed in alphabetical order. However,
it is suggested that you name the config files in "sysvinit style."
For example:
- 00-disabled.ldap
+ 00-disabled.pgsql
10-runthisfirst.sh
20-runthisnext.mysql
90-runthislast.rdiff
diff --git a/configure.in b/configure.in
index bc43c9a..2d30687 100644
--- a/configure.in
+++ b/configure.in
@@ -3,7 +3,7 @@
# The maintainer mode is causing me grief with newest versions of autotools
#AM_MAINTAINER_MODE
-AC_INIT([backupninja],[0.9.9],[backupninja@lists.riseup.net])
+AC_INIT([backupninja],[0.9.10],[backupninja@lists.riseup.net])
AC_CONFIG_SRCDIR([src/backupninja.in])
AM_INIT_AUTOMAKE
diff --git a/examples/Makefile.am b/examples/Makefile.am
index ce92b07..89bd56b 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,5 +1,5 @@
-EXAMPLES = example.dup example.ldap example.maildir example.makecd example.mysql \
+EXAMPLES = example.dup example.maildir example.makecd example.mysql \
example.pgsql example.rdiff example.rsync example.sh \
example.svn example.sys example.trac
diff --git a/examples/example.sh b/examples/example.sh
index f02f026..75b0162 100644
--- a/examples/example.sh
+++ b/examples/example.sh
@@ -1,2 +1,4 @@
+# Note: the spaces around the equal sign ('=') are optional.
+when = saturdays at 05:30
dpkg --get-selections > /var/backups/dpkg-selections.txt
diff --git a/handlers/Makefile.am b/handlers/Makefile.am
index c9ad2ba..54155e8 100644
--- a/handlers/Makefile.am
+++ b/handlers/Makefile.am
@@ -1,5 +1,5 @@
-HANDLERS = dup dup.helper ldap ldap.helper maildir makecd \
+HANDLERS = dup dup.helper maildir makecd \
makecd.helper mysql mysql.helper pgsql pgsql.helper rdiff \
rdiff.helper rsync sh svn sys sys.helper trac tar tar.helper
diff --git a/handlers/dup.in b/handlers/dup.in
index b58d34d..40f6723 100644
--- a/handlers/dup.in
+++ b/handlers/dup.in
@@ -155,9 +155,7 @@ else
fi
### Cleanup options
-if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 6 -a "$duplicity_sub" -ge 1 ]; then
- execstr_options="${execstr_options} --extra-clean"
-fi
+execstr_options="${execstr_options} --extra-clean"
### Temporary directory
if [ -n "$tmpdir" ]; then
@@ -172,12 +170,10 @@ if [ -n "$tmpdir" ]; then
fi
### Archive directory
-# duplicity >= 0.6.01 enables the archive_dir by default, let's put it into /var/cache/backupninja/duplicity
+# duplicity now enables the archive_dir by default, let's put it into /var/cache/backupninja/duplicity
# unless the user has specified it.
-if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 6 -a "$duplicity_sub" -ge 1 ]; then
- if echo "${options}" | grep -qv -- "--archive-dir" ; then
- execstr_options="${execstr_options} --archive-dir /var/cache/backupninja/duplicity"
- fi
+if echo "${options}" | grep -qv -- "--archive-dir" ; then
+ execstr_options="${execstr_options} --archive-dir /var/cache/backupninja/duplicity"
fi
### Cleanup old backup sets (or not)
@@ -279,7 +275,7 @@ fi
# remove-all-inc-of-but-n-full : remove increments of older full backups : only keep latest ones
if [ "$keep" != "yes" ]; then
if [ "$keepincroffulls" != "all" ]; then
- if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 9 -a "$duplicity_sub" -ge 10 ]; then
+ if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 6 -a "$duplicity_sub" -ge 10 ]; then
debug "$precmd duplicity remove-all-inc-of-but-n-full $keepincroffulls --force $execstr_options $execstr_serverpart"
if [ ! $test ]; then
export PASSPHRASE=$password
diff --git a/handlers/rdiff.helper.in b/handlers/rdiff.helper.in
index 039799e..1597305 100644
--- a/handlers/rdiff.helper.in
+++ b/handlers/rdiff.helper.in
@@ -265,7 +265,7 @@ do_rdiff_con() {
fi
fi
else
- msgBox "incompatible versions of rdiff-backup" "It looks like rdiff-backup is installed on the remote machine, but it may be an incompatible version with the one installed locally, or something else is amiss.\n\nPlease resolve this problem and then try connecting again.\n\n\nTry connecting again?"
+ booleanBox "incompatible versions of rdiff-backup" "It looks like rdiff-backup is installed on the remote machine, but it may be an incompatible version with the one installed locally, or something else is amiss.\n\nPlease resolve this problem and then try connecting again.\n\n\nTry connecting again?"
if [ $? = 0 ]; then
do_rdiff_con
else
diff --git a/handlers/rsync.in b/handlers/rsync.in
index d93411a..6c772e1 100644
--- a/handlers/rsync.in
+++ b/handlers/rsync.in
@@ -893,7 +893,7 @@ function set_rsync_options {
if [ "$from" == "local" ] || [ "$dest" == "local" ]; then
# rsync options for local sources or destinations
- rsync_options="$rsync_options"
+ rsync_options=($rsync_options)
fi
if [ "$from" == "remote" ] || [ "$dest" == "remote" ]; then
@@ -1070,8 +1070,8 @@ for SECTION in $include; do
set_dest
info "Syncing $SECTION on $dest_path..."
- debug $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path
- $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path | tee -a $log
+ debug $nice $rsync $rsync_options $filelist_flag $excludes $batch_option $orig $dest_path
+ $nice $rsync $rsync_options $filelist_flag $excludes $batch_option $orig $dest_path | tee -a $log
if [ "$?" != "0" ]; then
warning "Rsync error when trying to transfer $SECTION"
diff --git a/handlers/sh.in b/handlers/sh.in
index b070f3b..384ca52 100644
--- a/handlers/sh.in
+++ b/handlers/sh.in
@@ -5,4 +5,11 @@
# runs the file /etc/backup.d/scriptname.sh
#
+# No-op function so that 'when = XXX' can be written as such in
+# backup.d/*.sh, i.e. with spaces around the equal sign - as in every
+# other backup.d/ file.
+function when() {
+ true
+}
+
[ $test ] || ( . $1 )
diff --git a/handlers/sys.in b/handlers/sys.in
index 74133a3..74133a3 100755..100644
--- a/handlers/sys.in
+++ b/handlers/sys.in
diff --git a/man/backup.d.5 b/man/backup.d.5
index fd5c9b2..df2063e 100644
--- a/man/backup.d.5
+++ b/man/backup.d.5
@@ -39,8 +39,6 @@ backup action for slow, incremental rsyncs of tens of thousands of maildirs.
backup action for safe MySQL dumps.
.IP .pgsql
backup action for safe PostgreSQL dumps.
-.IP .ldap
-backup action for safe OpenLdap dumps.
.IP .sys
backup action for general system reports and hardware information.
.IP .svn
@@ -56,7 +54,7 @@ These files must be owned by root and must not be world or group readable/writab
The configuration files are processed in alphabetical order. However, it is suggested that you name the config files in "sysvinit style."
.TP
For example:
- 10-local.ldap.disabled
+ 10-local.pgsql.disabled
15-runthisfirst.sh
20-runthisnext.mysql
90-runthislast.rdiff
@@ -67,7 +65,7 @@ Example templates for the action configuration files can be found in /usr/share/
.SH SCHEDULING
-By default, each configuration file is processed everyday at 01:00 (1 AM). This can be changed by specifying the 'when' option in a backup action's config file or in the global configuration file. Special value 'manual' will disable scheduling for the backup action. It is possible to run the backup action manually by invoking \fBninjahelper(1)\fP with --run command line argument.
+By default, each configuration file is processed everyday at 01:00 (1 AM). This can be changed by specifying the 'when' option in a backup action's config file or in the global configuration file. Special value 'manual' will disable scheduling for the backup action. It is possible to run the backup action manually by invoking \fBninjahelper(1)\fP with \-\-run command line argument.
For example:
when = sundays at 02:00
diff --git a/man/backupninja.1 b/man/backupninja.1
index 4363222..b1d2875 100644
--- a/man/backupninja.1
+++ b/man/backupninja.1
@@ -104,9 +104,9 @@ Then, vital parts of the file system, including /var/backups, are nightly pushed
.TP
In order for this to work (ie for diff-backup to run unattended), you must create ssh keys on the source server and copy the public key to the remote user's authorized keys file. For example:
.br
-root@srchost# ssh-keygen -t rsa -b 4096
+root@srchost# ssh-keygen \-t rsa \-b 4096
.br
-root@srchost# ssh-copy-id -i /root/.ssh/id_dsa.pub backup@desthost
+root@srchost# ssh-copy-id \-i /root/.ssh/id_dsa.pub backup@desthost
.TP
Now, you should be able to ssh from user 'root' on srchost to user 'backup' on desthost without specifying a password. When prompted for a password by ssh-keygen, just leave it blank by hitting return. The "wizard" \fBninjahelper(1)\fP will walk you through these steps.
diff --git a/man/backupninja.conf.5 b/man/backupninja.conf.5
index 7911fdf..50e0238 100644
--- a/man/backupninja.conf.5
+++ b/man/backupninja.conf.5
@@ -24,7 +24,7 @@ BACKUPNINJA.CONF \- Configuration file(s) for \fBbackupninja (1)\fP.
.br
.SH DESCRIPTION
.B backupninja.conf
-is the general configuration file. In this file you can set the log level and change the default directory locations. You can force a different general configuration file with "backupninja -f /path/to/conf".
+is the general configuration file. In this file you can set the log level and change the default directory locations. You can force a different general configuration file with "backupninja \-f /path/to/conf".
.SH OPTIONS
diff --git a/man/ninjahelper.1 b/man/ninjahelper.1
index 34b1ce4..0135f69 100644
--- a/man/ninjahelper.1
+++ b/man/ninjahelper.1
@@ -33,7 +33,7 @@ menu-driven interface.
To add an additional 'wizard' to ninjahelper, follow these steps:
.IP (1)
create a file in the handlers directory (eg. /usr/share/backupninja) using
-the .helper extention. For example, if you wish to create a helper for the
+the .helper extension. For example, if you wish to create a helper for the
handler "blue", create the file /usr/share/backupninja/blue.helper.
.IP (2)
next, add your helper to the global HELPERS variable and define the main
diff --git a/src/backupninja.in b/src/backupninja.in
index f6a5b0e..0400828 100755
--- a/src/backupninja.in
+++ b/src/backupninja.in
@@ -325,7 +325,7 @@ function process_action() {
# start locked section : avoid concurrent execution of the same backup
# uses a construct specific to shell scripts with flock. See man flock for details
- (
+ {
debug "executing handler in locked section controlled by $lockfile"
flock -x -w 5 200
# if all is good, we acquired the lock
@@ -352,7 +352,7 @@ function process_action() {
debug "failed to acquire lock"
echo "Fatal: Could not acquire lock $lockfile. A backup is probably already running for $file." >>$bufferfile
fi
- ) 200> $lockfile
+ } 200> $lockfile
# end of locked section
_warnings=`cat $bufferfile | grep "^Warning: " | wc -l`