diff --git a/AUTHORS b/AUTHORS index 1319688617ea3d7fb18036b304adf404d433dbba..4e7299bed3469e8c014694159c29312b8fc8ffb7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -43,3 +43,4 @@ aihtdikh -- Allow 'when = XXX' with spaces in .sh files. Chris Lamb <lamby@debian.org> -- rdiff.helper bugfix Yuval Kogman <nothingmuch@woobling.org> -- RackSpace's CloudFiles support for duplicity exobuzz - mysql bugfixes +Glennie Vignarajah <glennie@glennie.fr> -- mysql bugfix diff --git a/ChangeLog b/ChangeLog index 209eacfca4b71bd5e08ca4675b4dd979ac0128ef..179d52f6aa939e2148b9ed6db98a81a188dc1d08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +version 1.0 -- June 15, 2012 + The "happy birthdays" release! + handler changes + mysql: + . Use --skip-events when backing up the performance_schema database. + (Closes: #673572) + rsync: + . Generate excludes command-line snippet the same way as + the duplicity handler does. + . Run rsync command-line through a shell, so that single-quotes + around excludes are interpreted (Closes: #677410) + sys: + . Don't execute /usr/bin/lspci or /sbin/modinfo when $hardware == "no" + backupninja changes + . Make it clear what lockfile could not be acquired, if any. + version 1.0-rc1 -- May 15, 2012 handler changes dup: diff --git a/backupninja.spec b/backupninja.spec index f55a6dd9021207d6a18b5368b7cf4baa035d1aa3..124f0d101b46250858ecaa1de7f18cb7fb75cbf3 100644 --- a/backupninja.spec +++ b/backupninja.spec @@ -1,5 +1,5 @@ %define name backupninja -%define version 1.0-rc1 +%define version 1.0 Summary: Backupninja backup tool Name: %{name} diff --git a/configure b/configure index 7977067eac47138d8bc600e2694b6bdb23c4bcc5..12d7562dc569ca6ed427b1bb0c6997ea56fcfb94 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for backupninja 1.0-rc1. +# Generated by GNU Autoconf 2.69 for backupninja 1.0. # # Report bugs to <backupninja@lists.riseup.net>. # @@ -579,8 +579,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='backupninja' PACKAGE_TARNAME='backupninja' -PACKAGE_VERSION='1.0-rc1' -PACKAGE_STRING='backupninja 1.0-rc1' +PACKAGE_VERSION='1.0' +PACKAGE_STRING='backupninja 1.0' PACKAGE_BUGREPORT='backupninja@lists.riseup.net' PACKAGE_URL='' @@ -1203,7 +1203,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures backupninja 1.0-rc1 to adapt to many kinds of systems. +\`configure' configures backupninja 1.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1269,7 +1269,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of backupninja 1.0-rc1:";; + short | recursive ) echo "Configuration of backupninja 1.0:";; esac cat <<\_ACEOF @@ -1336,7 +1336,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -backupninja configure 1.0-rc1 +backupninja configure 1.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1353,7 +1353,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by backupninja $as_me 1.0-rc1, which was +It was created by backupninja $as_me 1.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2169,7 +2169,7 @@ fi # Define the identity of the package. PACKAGE='backupninja' - VERSION='1.0-rc1' + VERSION='1.0' cat >>confdefs.h <<_ACEOF @@ -3143,7 +3143,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by backupninja $as_me 1.0-rc1, which was +This file was extended by backupninja $as_me 1.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3196,7 +3196,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -backupninja config.status 1.0-rc1 +backupninja config.status 1.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.in b/configure.in index 3cddf61609cb394ffbe293324672ebf3ed45fc28..dcb8c2472449774ebee312923f488aa1361733a9 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],[1.0-rc1],[backupninja@lists.riseup.net]) +AC_INIT([backupninja],[1.0],[backupninja@lists.riseup.net]) AC_CONFIG_SRCDIR([src/backupninja.in]) AM_INIT_AUTOMAKE diff --git a/handlers/maildir.in b/handlers/maildir.in index 912c0e68daf8d7931e903c398e57689d616155fc..64ac987ff98f5f726b45d1bc9dc7a7a96b5f3cb5 100644 --- a/handlers/maildir.in +++ b/handlers/maildir.in @@ -85,9 +85,6 @@ if [ $test ]; then testflags="--dry-run -v" fi -rsyncflags="$testflags -e 'ssh -p $destport -i $destid_file $sshoptions' -r -v --ignore-existing --delete --size-only --bwlimit=$speedlimit" -excludes="--exclude '.Trash/\*' --exclude '.Mistakes/\*' --exclude '.Spam/\*'" - ################################################################## ### FUNCTIONS diff --git a/handlers/mysql.in b/handlers/mysql.in index 65deebbc62ac840a6c10c15e263daf37141768a7..6ade49e88e882a495dcb0f02de0f77b750d20ee4 100644 --- a/handlers/mysql.in +++ b/handlers/mysql.in @@ -256,10 +256,15 @@ then for db in $databases do DUMP_BASE="$MYSQLDUMP $defaultsfile $sqldumpoptions" - if [ "$db" = "information_schema" ] || [ "$db" = "performance_schema" ] - then - DUMP_BASE="${DUMP_BASE} --skip-lock-tables" - fi + + case "$db" in + information_schema) + DUMP_BASE="${DUMP_BASE} --skip-lock-tables" + ;; + performance_schema) + DUMP_BASE="${DUMP_BASE} --skip-lock-tables --skip-events" + ;; + esac # Dumping structure and data DUMP="$DUMP_BASE $ignore $db" diff --git a/handlers/rsync.in b/handlers/rsync.in index 386255ea865b990fc8e0919b7ed160e37e0533ba..f0df52f588117b173b07cc787ff74bcc77d8c73e 100644 --- a/handlers/rsync.in +++ b/handlers/rsync.in @@ -275,8 +275,15 @@ function eval_config { mv=move_files fi - excludes=`echo "$exclude" | @SED@ -e "s/^/--exclude='/g" -e "s/ /' --exclude='/g" -e "s/$/'/"` - + set -o noglob + SAVEIFS=$IFS + IFS=$(echo -en "\n\b") + for i in $exclude; do + str="${i//__star__/*}" + excludes="${excludes} --exclude='$str'" + done + IFS=$SAVEIFS + set +o noglob } function rotate_short { @@ -1109,9 +1116,9 @@ 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 + debug $nice $rsync ${rsync_options[@]} $filelist_flag $excludes $batch_option $orig $dest_path set_pipefail - $nice $rsync "${rsync_options[@]}" $filelist_flag "$excludes" $batch_option $orig $dest_path | tee -a $log + $nice su -c "$rsync ${rsync_options[@]} --delete-excluded $filelist_flag $excludes $batch_option $orig $dest_path" | tee -a $log if [ "$?" != "0" ]; then fatal "Rsync error when trying to transfer $SECTION" diff --git a/handlers/sys.in b/handlers/sys.in index 74133a3765ebd242cc4628f415ad5b4cb1b0da03..92998cc476b4610c1fb8daf656a1569bf2ec4fe9 100644 --- a/handlers/sys.in +++ b/handlers/sys.in @@ -348,13 +348,15 @@ echo "Getting information about the kernel." echo STATUS="Getting kernel version:" catifexec "/bin/uname" "-a" -STATUS="Checking module information:" -catifexec "/sbin/lsmod" -for x in $(/sbin/lsmod | /usr/bin/cut -f1 -d" " 2>/dev/null | /bin/grep -v Module 2>/dev/null -) ; do - STATUS="Checking module information $x:" - catifexec "/sbin/modinfo" "$x" -done +if [ "$hardware" == "yes" ]; then + STATUS="Checking module information:" + catifexec "/sbin/lsmod" + for x in $(/sbin/lsmod | /usr/bin/cut -f1 -d" " 2>/dev/null | /bin/grep -v Module 2>/dev/null + ) ; do + STATUS="Checking module information $x:" + catifexec "/sbin/modinfo" "$x" + done +fi STATUS="Gathering information about your filesystems:" catiffile "/proc/filesystems" @@ -432,9 +434,11 @@ catiffile "/proc/rtc" STATUS="Gathering information about your ide drivers:" catiffile "/proc/ide" -STATUS="Gathering information about your bus:" -catifexec "/usr/bin/lspci" -catiffile "/proc/bus" +if [ "$hardware" == "yes" ]; then + STATUS="Gathering information about your bus:" + catifexec "/usr/bin/lspci" + catiffile "/proc/bus" +fi echo echo "Getting disk and filesystem information." diff --git a/src/backupninja.in b/src/backupninja.in index 040082844ee0dbbc17888c1d23496af8d130a11f..0f74906d843b147009a4d20c44ec0601fc5c2bad 100755 --- a/src/backupninja.in +++ b/src/backupninja.in @@ -349,7 +349,7 @@ function process_action() { else # a backup is probably ongoing already, so display an error message - debug "failed to acquire lock" + debug "failed to acquire lock $lockfile" echo "Fatal: Could not acquire lock $lockfile. A backup is probably already running for $file." >>$bufferfile fi } 200> $lockfile