From 4f4b9c49f297f973654fb926fcbfc657b6909d63 Mon Sep 17 00:00:00 2001 From: micah Date: Tue, 7 Mar 2006 18:40:08 +0000 Subject: [PATCH 01/16] mysql tried to remove a tmpfile that didn't exist, fixed check for this git-svn-id: http://code.autistici.org/svn/backupninja/trunk@368 758a04ac-41e6-0310-8a23-8373a73cc35d --- ChangeLog | 1 + handlers/mysql | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 99a7aef..aec8d97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ version 0.9.4 -- unreleased mysql, pgsql, svn: fixed inversed vsname emptyness check mysql: . Fixed improper use of $vuserhome (Debian: #351083) + . Fixed erroneous removal of tmpfile when it didn't exit lib changes vserver: . init_vservers: fixed Debian bug #351083 (improper readlink syntax) diff --git a/handlers/mysql b/handlers/mysql index f89d8d7..ae54aae 100644 --- a/handlers/mysql +++ b/handlers/mysql @@ -277,7 +277,7 @@ fi fi # clean up tmp config file -if [ "$dbusername" != "" ] +if [ "$dbusername" != "" -a "$dbpassword" != "" ] then ## clean up tmp config file debug "rm $mycnf" -- 2.30.2 From 80303fea5381d115ed7353e514bb5eec157f8826 Mon Sep 17 00:00:00 2001 From: micah Date: Sat, 11 Mar 2006 07:21:04 +0000 Subject: [PATCH 02/16] If you include= or exclude= a directory that is actually a symlink somewhere along the chain you will only backup the symlink, and not the data, this is fixed here in rdiff with this change git-svn-id: http://code.autistici.org/svn/backupninja/trunk@369 758a04ac-41e6-0310-8a23-8373a73cc35d --- ChangeLog | 2 ++ handlers/rdiff | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index aec8d97..a6fb5e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ version 0.9.4 -- unreleased mysql: . Fixed improper use of $vuserhome (Debian: #351083) . Fixed erroneous removal of tmpfile when it didn't exit + rdiff: + . Fixed improper include/exclude symlink dereference lib changes vserver: . init_vservers: fixed Debian bug #351083 (improper readlink syntax) diff --git a/handlers/rdiff b/handlers/rdiff index 4871d4e..6cbe6fa 100644 --- a/handlers/rdiff +++ b/handlers/rdiff @@ -174,12 +174,14 @@ set -o noglob # TODO: order the includes and excludes # excludes for i in $exclude; do + i=`readlink -f $i` str="${i//__star__/*}" execstr="${execstr}--exclude '$str' " done # includes for i in $include; do [ "$i" != "/" ] || fatal "Sorry, you cannot use 'include = /'" + i=`readlink -f $i` str="${i//__star__/*}" execstr="${execstr}--include '$str' " done @@ -188,7 +190,8 @@ done if [ $usevserver = yes ]; then for vserver in $vsnames; do for vi in $vsinclude; do - str="${vi//__star__/*}" + i=`readlink -f $VROOTDIR/$vserver$vi` + str="${i//__star__/*}" execstr="${execstr}--include '$VROOTDIR/$vserver$str' " done done -- 2.30.2 From a5d5455b8d99a54e304c5dafd2ebda1e30cf8b03 Mon Sep 17 00:00:00 2001 From: micah Date: Sat, 11 Mar 2006 07:22:44 +0000 Subject: [PATCH 03/16] Fixed the include=/exclude= improper dereference problem in the dup handler git-svn-id: http://code.autistici.org/svn/backupninja/trunk@370 758a04ac-41e6-0310-8a23-8373a73cc35d --- ChangeLog | 2 ++ handlers/dup | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a6fb5e5..5f4eb4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ version 0.9.4 -- unreleased . Fixed erroneous removal of tmpfile when it didn't exit rdiff: . Fixed improper include/exclude symlink dereference + dup: + . Fixed improper include/exclude symlink dereference lib changes vserver: . init_vservers: fixed Debian bug #351083 (improper readlink syntax) diff --git a/handlers/dup b/handlers/dup index 6918702..227ba8b 100644 --- a/handlers/dup +++ b/handlers/dup @@ -118,12 +118,14 @@ set -o noglob # excludes for i in $exclude; do + i=`readlink -f $i` str="${i//__star__/*}" execstr="${execstr}--exclude '$str' " done # includes for i in $include; do + i=`readlink -f $i` str="${i//__star__/*}" execstr="${execstr}--include '$str' " done @@ -132,7 +134,8 @@ done if [ $usevserver = yes ]; then for vserver in $vsnames; do for vi in $vsinclude; do - str="${vi//__star__/*}" + i=`readlink -f $VROOTDIR/$vserver$vi` + str="${i//__star__/*}" execstr="${execstr}--include '$VROOTDIR/$vserver$str' " done done -- 2.30.2 From b0a1c026efa1ec9c001a1077ffac7fdcdbe2ec71 Mon Sep 17 00:00:00 2001 From: micah Date: Wed, 15 Mar 2006 00:06:19 +0000 Subject: [PATCH 04/16] Harder than it looks at first! This appears to fix it, but please try it out. git-svn-id: http://code.autistici.org/svn/backupninja/trunk@371 758a04ac-41e6-0310-8a23-8373a73cc35d --- examples/example.dup | 14 -------------- examples/example.rdiff | 5 +---- examples/example.sys | 2 +- handlers/dup | 4 ++-- handlers/rdiff | 4 ++-- 5 files changed, 6 insertions(+), 23 deletions(-) diff --git a/examples/example.dup b/examples/example.dup index e6a66a8..a5c1b67 100644 --- a/examples/example.dup +++ b/examples/example.dup @@ -55,20 +55,6 @@ password = a_very_complicated_passphrase # files to include in the backup # (supports globbing with '*') -# BIG FAT WARNING -# Symlinks are not dereferenced. Moreover, an include line whose path -# contains, at any level, a symlink to a directory, will only have the -# symlink backed-up, not the target directory's content. Yes, you have -# to dereference yourself the symlinks, or to use 'mount --bind' -# instead. -# EXAMPLE -# Let's say /home is a symlink to /mnt/crypt/home ; the following line -# will only backup a "/home" symlink ; neither /home/user nor -# /home/user/Mail will be backed-up : -# include = /home/user/Mail -# A workaround is to 'mount --bind /mnt/crypt/home /home' ; another -# one is to write : -# include = /mnt/crypt/home/user/Mail include = /var/spool/cron/crontabs include = /var/backups diff --git a/examples/example.rdiff b/examples/example.rdiff index 198516c..da39329 100644 --- a/examples/example.rdiff +++ b/examples/example.rdiff @@ -35,10 +35,7 @@ keep = 60 # a note about includes and excludes: # All the excludes come after all the includes. The order is -# not otherwise taken into account. Symlinks are backed up as -# symlinks, they are not followed! This means you must specify -# the real canonical path of a directory for it to actually -# get included. +# not otherwise taken into account. # files to include in the backup # (supports globbing with '*') diff --git a/examples/example.sys b/examples/example.sys index 9ebd4b2..a05726b 100644 --- a/examples/example.sys +++ b/examples/example.sys @@ -25,7 +25,7 @@ # packagesfile = /var/backups/dpkg-selections.txt # partitions = yes -# partitionsfile = /var/backups/partitions.__star__.txt +# partitionsfile = /var/backups/partitions.*.txt # hardware = yes # hardwarefile = /var/backups/hardware.txt diff --git a/handlers/dup b/handlers/dup index 227ba8b..1f54652 100644 --- a/handlers/dup +++ b/handlers/dup @@ -118,15 +118,15 @@ set -o noglob # excludes for i in $exclude; do - i=`readlink -f $i` str="${i//__star__/*}" + i=`readlink -f ${i#}` execstr="${execstr}--exclude '$str' " done # includes for i in $include; do - i=`readlink -f $i` str="${i//__star__/*}" + i=`readlink -f ${i#}` execstr="${execstr}--include '$str' " done diff --git a/handlers/rdiff b/handlers/rdiff index 6cbe6fa..4aebfd3 100644 --- a/handlers/rdiff +++ b/handlers/rdiff @@ -174,15 +174,15 @@ set -o noglob # TODO: order the includes and excludes # excludes for i in $exclude; do - i=`readlink -f $i` str="${i//__star__/*}" + i=`readlink -f ${i#}` execstr="${execstr}--exclude '$str' " done # includes for i in $include; do [ "$i" != "/" ] || fatal "Sorry, you cannot use 'include = /'" - i=`readlink -f $i` str="${i//__star__/*}" + i=`readlink -f $i` execstr="${execstr}--include '$str' " done -- 2.30.2 From 606a958ada84c0d84ff721d977a04cc9b2279aca Mon Sep 17 00:00:00 2001 From: micah Date: Wed, 15 Mar 2006 18:05:43 +0000 Subject: [PATCH 05/16] lost+found was not being removed from the list of found_vservers because the + was being interpreted by grep -E, I've escaped it so it will properly be removed git-svn-id: http://code.autistici.org/svn/backupninja/trunk@372 758a04ac-41e6-0310-8a23-8373a73cc35d --- ChangeLog | 1 + lib/vserver.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5f4eb4d..05125ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ version 0.9.4 -- unreleased lib changes vserver: . init_vservers: fixed Debian bug #351083 (improper readlink syntax) + . found_vservers: escaped special grep repetition character + version 0.9.3 -- February 1st, 2006 autotools fixes diff --git a/lib/vserver.in b/lib/vserver.in index 8a585bf..8ac7b7e 100644 --- a/lib/vserver.in +++ b/lib/vserver.in @@ -63,7 +63,7 @@ init_vservers() { "vservers enabled in $conffile, but VROOTDIR ($VROOTDIR) does not exist."; return fi - found_vservers=`ls $VROOTDIR | grep -E -v "lost+found|ARCHIVES" | tr "\n" " "` + found_vservers=`ls $VROOTDIR | grep -E -v "lost\+found|ARCHIVES" | tr "\n" " "` if [ -z "$found_vservers" ]; then `if [ "$arg" = nodialog ]; then echo warning; else echo "msgBox warning"; fi` \ "vservers enabled in $conffile, but no vserver was found in $VROOTDIR."; -- 2.30.2 From 90d02121f2ac64cef28659941693dd2fd2a23e56 Mon Sep 17 00:00:00 2001 From: micah Date: Mon, 20 Mar 2006 23:08:07 +0000 Subject: [PATCH 06/16] Fixed su quoting usage, as outlined here: http://lists.debian.org/debian-devel-announce/2006/03/msg00003.html git-svn-id: http://code.autistici.org/svn/backupninja/trunk@373 758a04ac-41e6-0310-8a23-8373a73cc35d --- ChangeLog | 8 +++++++- examples/example.rdiff | 2 +- handlers/mysql | 8 ++++---- handlers/pgsql | 8 ++++---- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05125ba..13c92d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,15 @@ version 0.9.4 -- unreleased handler changes - mysql, pgsql, svn: fixed inversed vsname emptyness check mysql: . Fixed improper use of $vuserhome (Debian: #351083) . Fixed erroneous removal of tmpfile when it didn't exit + . Fixed inversed vsname emptiness check + . Fixed su quote usage to be more posixy + pgsql: + . Fixed inversed vsname emptiness check + . Fixed su quote usage to be more posixy + svn: + . Fixed inversed vsname emptiness check rdiff: . Fixed improper include/exclude symlink dereference dup: diff --git a/examples/example.rdiff b/examples/example.rdiff index da39329..698776e 100644 --- a/examples/example.rdiff +++ b/examples/example.rdiff @@ -86,7 +86,7 @@ directory = /backups host = backuphost # make the files owned by this user. you must be able to -# `su -c ssh backupuser@backhost` without specifying a password. +# `su -c "ssh backupuser@backhost"` without specifying a password. # only use if "[dest] type = remote" user = backupuser diff --git a/handlers/mysql b/handlers/mysql index ae54aae..4bfffbb 100644 --- a/handlers/mysql +++ b/handlers/mysql @@ -179,7 +179,7 @@ then else execstr="$MYSQLHOTCOPY --quiet --allowold --regexp /.\*/./.\*/ $hotdir" fi - debug "su $user -c '$execstr'" + debug 'su $user -c "$execstr"' if [ ! $test ] then output=`su $user -c "$execstr" 2>&1` @@ -202,7 +202,7 @@ then else execstr="$MYSQLHOTCOPY --allowold $db $hotdir" fi - debug "su $user -c '$execstr'" + debug 'su $user -c "$execstr"' if [ ! $test ] then output=`su $user -c "$execstr" 2>&1` @@ -230,7 +230,7 @@ then then if [ $usevserver = yes ] then - debug "echo show databases | $VSERVER $vsname exec su $user -c $MYSQL $defaultsfile | grep -v Database" + debug 'echo show databases | $VSERVER $vsname exec su $user -c "$MYSQL $defaultsfile" | grep -v Database' databases=`echo 'show databases' | $VSERVER $vsname exec su $user -c "$MYSQL $defaultsfile" | grep -v Database` if [ $? -ne 0 ] then @@ -253,7 +253,7 @@ fi else execstr="$MYSQLDUMP $defaultsfile --lock-tables --complete-insert --add-drop-table --quick --quote-names $ignore $db > $dumpdir/${db}.sql" fi - debug "su $user -c '$execstr'" + debug 'su $user -c "$execstr"' if [ ! $test ] then output=`su $user -c "$execstr" 2>&1` diff --git a/handlers/pgsql b/handlers/pgsql index c7197a8..e9d40cf 100644 --- a/handlers/pgsql +++ b/handlers/pgsql @@ -72,9 +72,9 @@ chmod 700 $vroot$backupdir # if $databases = all, use pg_dumpall if [ "$databases" == "all" ]; then if [ $usevserver = yes ]; then - execstr="$VSERVER $vsname exec su - postgres -c $PGSQLDUMPALL > $backupdir/${vsname}.sql" + execstr='$VSERVER $vsname exec su - postgres -c "$PGSQLDUMPALL > $backupdir/${vsname}.sql"' else - execstr="su - postgres -c $PGSQLDUMPALL > $backupdir/${localhost}-all.sql" + execstr='su - postgres -c "$PGSQLDUMPALL > $backupdir/${localhost}-all.sql"' fi debug "$execstr" if [ ! $test ]; then @@ -94,9 +94,9 @@ else for db in $databases; do if [ $usevserver = yes ] then - execstr="$VSERVER $vsname exec su - postgres -c $PGSQLDUMP $db > $backupdir/${db}.sql" + execstr='$VSERVER $vsname exec su - postgres -c "$PGSQLDUMP $db > $backupdir/${db}.sql"' else - execstr="su - postgres -c $PGSQLDUMP $db > $backupdir/${db}.sql" + execstr='su - postgres -c "$PGSQLDUMP $db > $backupdir/${db}.sql"' fi debug "$execstr" if [ ! $test ]; then -- 2.30.2 From e3aceb80ccbebb29e0452c3b1a3641e330a1a2b1 Mon Sep 17 00:00:00 2001 From: micah Date: Sat, 25 Mar 2006 17:54:22 +0000 Subject: [PATCH 07/16] Remove AM_MAINTAINER_MODE from configure.in because it is erroring out with newest autotools git-svn-id: http://code.autistici.org/svn/backupninja/trunk@374 758a04ac-41e6-0310-8a23-8373a73cc35d --- configure.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index ae6b107..5781ce7 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,8 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AM_MAINTAINER_MODE +# The maintainer mode is causing me grief with newest versions of autotools +#AM_MAINTAINER_MODE AC_INIT([backupninja],[0.9.3],[backupninja@lists.riseup.net]) AC_CONFIG_SRCDIR([src/backupninja.in]) AM_INIT_AUTOMAKE -- 2.30.2 From d67c4b1fb77dc068783cddb6af3121b39d68783d Mon Sep 17 00:00:00 2001 From: micah Date: Sat, 25 Mar 2006 20:14:03 +0000 Subject: [PATCH 08/16] Added escaping of double quotes that were added previously git-svn-id: http://code.autistici.org/svn/backupninja/trunk@375 758a04ac-41e6-0310-8a23-8373a73cc35d --- handlers/mysql | 18 +++++++++--------- handlers/pgsql | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/handlers/mysql b/handlers/mysql index 4bfffbb..1bf4edb 100644 --- a/handlers/mysql +++ b/handlers/mysql @@ -179,10 +179,10 @@ then else execstr="$MYSQLHOTCOPY --quiet --allowold --regexp /.\*/./.\*/ $hotdir" fi - debug 'su $user -c "$execstr"' + debug 'su $user -c \"$execstr\"' if [ ! $test ] then - output=`su $user -c "$execstr" 2>&1` + output=`su $user -c \"$execstr\" 2>&1` code=$? if [ "$code" == "0" ] then @@ -202,10 +202,10 @@ then else execstr="$MYSQLHOTCOPY --allowold $db $hotdir" fi - debug 'su $user -c "$execstr"' + debug 'su $user -c \"$execstr\"' if [ ! $test ] then - output=`su $user -c "$execstr" 2>&1` + output=`su $user -c \"$execstr\" 2>&1` code=$? if [ "$code" == "0" ] then @@ -230,14 +230,14 @@ then then if [ $usevserver = yes ] then - debug 'echo show databases | $VSERVER $vsname exec su $user -c "$MYSQL $defaultsfile" | grep -v Database' - databases=`echo 'show databases' | $VSERVER $vsname exec su $user -c "$MYSQL $defaultsfile" | grep -v Database` + debug 'echo show databases | $VSERVER $vsname exec su $user -c \"$MYSQL $defaultsfile\" | grep -v Database' + databases=`echo 'show databases' | $VSERVER $vsname exec su $user -c \"$MYSQL $defaultsfile\" | grep -v Database` if [ $? -ne 0 ] then fatal "Authentication problem, maybe user/password is wrong" fi else - databases=`echo 'show databases' | su $user -c "$MYSQL $defaultsfile" | grep -v Database` + databases=`echo 'show databases' | su $user -c \"$MYSQL $defaultsfile\" | grep -v Database` if [ $? -ne 0 ] then fatal "Authentication problem, maybe user/password is wrong" @@ -253,10 +253,10 @@ fi else execstr="$MYSQLDUMP $defaultsfile --lock-tables --complete-insert --add-drop-table --quick --quote-names $ignore $db > $dumpdir/${db}.sql" fi - debug 'su $user -c "$execstr"' + debug 'su $user -c \"$execstr\"' if [ ! $test ] then - output=`su $user -c "$execstr" 2>&1` + output=`su $user -c \"$execstr\" 2>&1` code=$? if [ "$code" == "0" ] then diff --git a/handlers/pgsql b/handlers/pgsql index e9d40cf..940f16b 100644 --- a/handlers/pgsql +++ b/handlers/pgsql @@ -72,9 +72,9 @@ chmod 700 $vroot$backupdir # if $databases = all, use pg_dumpall if [ "$databases" == "all" ]; then if [ $usevserver = yes ]; then - execstr='$VSERVER $vsname exec su - postgres -c "$PGSQLDUMPALL > $backupdir/${vsname}.sql"' + execstr='$VSERVER $vsname exec su - postgres -c \"$PGSQLDUMPALL > $backupdir/${vsname}.sql\"' else - execstr='su - postgres -c "$PGSQLDUMPALL > $backupdir/${localhost}-all.sql"' + execstr='su - postgres -c \"$PGSQLDUMPALL > $backupdir/${localhost}-all.sql\"' fi debug "$execstr" if [ ! $test ]; then @@ -94,9 +94,9 @@ else for db in $databases; do if [ $usevserver = yes ] then - execstr='$VSERVER $vsname exec su - postgres -c "$PGSQLDUMP $db > $backupdir/${db}.sql"' + execstr='$VSERVER $vsname exec su - postgres -c \"$PGSQLDUMP $db > $backupdir/${db}.sql\"' else - execstr='su - postgres -c "$PGSQLDUMP $db > $backupdir/${db}.sql"' + execstr='su - postgres -c \"$PGSQLDUMP $db > $backupdir/${db}.sql\"' fi debug "$execstr" if [ ! $test ]; then -- 2.30.2 From 26a103265dbe001e20010aec2623ea92c8e5d895 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 4 Apr 2006 17:29:40 +0000 Subject: [PATCH 09/16] corrected minor typo git-svn-id: http://code.autistici.org/svn/backupninja/trunk@376 758a04ac-41e6-0310-8a23-8373a73cc35d --- man/backup.d.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/backup.d.5 b/man/backup.d.5 index 34a2d92..5090051 100644 --- a/man/backup.d.5 +++ b/man/backup.d.5 @@ -56,12 +56,12 @@ 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-disabled.ldap.disabled + 10-local.ldap.disabled 15-runthisfirst.sh 20-runthisnext.mysql 90-runthislast.rdiff .TP -Typically, you will put a '.rdiff' config file last, so that any database dumps you make are included in the filesystem backup. Action configurations which begin end with .disabled are skipped. +Typically, you will put a '.rdiff' config file last, so that any database dumps you make are included in the filesystem backup. Action configurations which end with .disabled are skipped. .TP Example templates for the action configuration files can be found in /usr/share/doc/backupninja/examples. You can also use \fBninjahelper(1)\fP, a console based "wizard" for creating backup actions. -- 2.30.2 From c1e6bf5cfe6cf3dd673ebf4908bc2884e640d6c9 Mon Sep 17 00:00:00 2001 From: micah Date: Wed, 5 Apr 2006 04:40:40 +0000 Subject: [PATCH 10/16] Removed over zelous vsnames check git-svn-id: http://code.autistici.org/svn/backupninja/trunk@377 758a04ac-41e6-0310-8a23-8373a73cc35d --- ChangeLog | 3 +++ handlers/dup | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 13c92d1..5c23aa9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,12 +12,15 @@ version 0.9.4 -- unreleased . Fixed inversed vsname emptiness check rdiff: . Fixed improper include/exclude symlink dereference + . Removed overzealous vsnames check dup: . Fixed improper include/exclude symlink dereference + . Removed over zealous vsnames check lib changes vserver: . init_vservers: fixed Debian bug #351083 (improper readlink syntax) . found_vservers: escaped special grep repetition character + + minor documentation fixes version 0.9.3 -- February 1st, 2006 autotools fixes diff --git a/handlers/dup b/handlers/dup index 1f54652..e490aa5 100644 --- a/handlers/dup +++ b/handlers/dup @@ -51,7 +51,6 @@ if [ $vservers_are_available = yes ]; then fi else [ -z "$vsinclude" ] || warning 'vservers support disabled in backupninja.conf, vsincludes configuration lines will be ignored' - [ -z "$vsnames" ] || warning 'vservers support disabled in backupninja.conf, vsnames configuration line will be ignored' fi ### see if we can login ### -- 2.30.2 From 388db481d47d4ff77bef33b8be6f27a978f83706 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sat, 8 Apr 2006 10:29:48 +0000 Subject: [PATCH 11/16] git-svn-id: http://code.autistici.org/svn/backupninja/trunk@378 758a04ac-41e6-0310-8a23-8373a73cc35d --- TODO | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TODO b/TODO index 5b004e2..a5e513a 100644 --- a/TODO +++ b/TODO @@ -5,6 +5,9 @@ you are working on it! . Fix all bugs reported on the Debian BTS: http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&data=backupninja&archive=no +. Figure out why configure decides to use /bin/sh for bash when + it shouldn't (Debian bug #346303) + . Make ninjahelper allow you to pick what type of backup you want (instead of just assuming you want local-to-remote, or push backups. Some people want local-to-local, or remote-to-local, or pull backups). This has been -- 2.30.2 From 2a1b3e5cd2d6784cb4fcbe3c8a399b36e29cf8d0 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sat, 8 Apr 2006 10:31:14 +0000 Subject: [PATCH 12/16] r4446@krups: intrigeri | 2006-04-08 12:28:59 +0200 mysql handler: removed over-enthusiastic quote-escaping, related to su ; previous versions broke the mysql handler both on sarge and sid. git-svn-id: http://code.autistici.org/svn/backupninja/trunk@379 758a04ac-41e6-0310-8a23-8373a73cc35d --- handlers/mysql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/handlers/mysql b/handlers/mysql index 1bf4edb..2dcf2d5 100644 --- a/handlers/mysql +++ b/handlers/mysql @@ -179,10 +179,10 @@ then else execstr="$MYSQLHOTCOPY --quiet --allowold --regexp /.\*/./.\*/ $hotdir" fi - debug 'su $user -c \"$execstr\"' + debug 'su $user -c "$execstr"' if [ ! $test ] then - output=`su $user -c \"$execstr\" 2>&1` + output=`su $user -c "$execstr" 2>&1` code=$? if [ "$code" == "0" ] then @@ -202,10 +202,10 @@ then else execstr="$MYSQLHOTCOPY --allowold $db $hotdir" fi - debug 'su $user -c \"$execstr\"' + debug 'su $user -c "$execstr"' if [ ! $test ] then - output=`su $user -c \"$execstr\" 2>&1` + output=`su $user -c "$execstr" 2>&1` code=$? if [ "$code" == "0" ] then @@ -231,13 +231,13 @@ then if [ $usevserver = yes ] then debug 'echo show databases | $VSERVER $vsname exec su $user -c \"$MYSQL $defaultsfile\" | grep -v Database' - databases=`echo 'show databases' | $VSERVER $vsname exec su $user -c \"$MYSQL $defaultsfile\" | grep -v Database` + databases=`echo 'show databases' | $VSERVER $vsname exec su $user -c "$MYSQL $defaultsfile" | grep -v Database` if [ $? -ne 0 ] then fatal "Authentication problem, maybe user/password is wrong" fi else - databases=`echo 'show databases' | su $user -c \"$MYSQL $defaultsfile\" | grep -v Database` + databases=`echo 'show databases' | su $user -c "$MYSQL $defaultsfile" | grep -v Database` if [ $? -ne 0 ] then fatal "Authentication problem, maybe user/password is wrong" @@ -253,10 +253,10 @@ fi else execstr="$MYSQLDUMP $defaultsfile --lock-tables --complete-insert --add-drop-table --quick --quote-names $ignore $db > $dumpdir/${db}.sql" fi - debug 'su $user -c \"$execstr\"' + debug 'su $user -c "$execstr"' if [ ! $test ] then - output=`su $user -c \"$execstr\" 2>&1` + output=`su $user -c "$execstr" 2>&1` code=$? if [ "$code" == "0" ] then -- 2.30.2 From bee1f8abe51d5f2f0b196b142a5865d6b5e5ff80 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sat, 8 Apr 2006 10:35:47 +0000 Subject: [PATCH 13/16] TODO: removed erroeously re-added old item git-svn-id: http://code.autistici.org/svn/backupninja/trunk@380 758a04ac-41e6-0310-8a23-8373a73cc35d --- TODO | 3 --- 1 file changed, 3 deletions(-) diff --git a/TODO b/TODO index a5e513a..5b004e2 100644 --- a/TODO +++ b/TODO @@ -5,9 +5,6 @@ you are working on it! . Fix all bugs reported on the Debian BTS: http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&data=backupninja&archive=no -. Figure out why configure decides to use /bin/sh for bash when - it shouldn't (Debian bug #346303) - . Make ninjahelper allow you to pick what type of backup you want (instead of just assuming you want local-to-remote, or push backups. Some people want local-to-local, or remote-to-local, or pull backups). This has been -- 2.30.2 From f35864670574fb10ffdaf8726bee60c70762be7a Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sat, 8 Apr 2006 10:44:55 +0000 Subject: [PATCH 14/16] Recursively ignore subdirs in /etc/backup.d (Closes: #361102) git-svn-id: http://code.autistici.org/svn/backupninja/trunk@381 758a04ac-41e6-0310-8a23-8373a73cc35d --- ChangeLog | 2 ++ src/backupninja.in | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5c23aa9..b1db818 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ version 0.9.4 -- unreleased + backupninja changes + Recursively ignore subdirs in /etc/backup.d (Closes: #361102) handler changes mysql: . Fixed improper use of $vuserhome (Debian: #351083) diff --git a/src/backupninja.in b/src/backupninja.in index b0766eb..2835a3c 100755 --- a/src/backupninja.in +++ b/src/backupninja.in @@ -455,7 +455,7 @@ errormsg="" if [ "$singlerun" ]; then files=$singlerun else - files=`find $configdirectory -mindepth 1 ! -name '.*.swp' | sort -n` + files=`find $configdirectory -mindepth 1 -maxdepth 1 -type f ! -name '.*.swp' | sort -n` fi for file in $files; do -- 2.30.2 From 0725dbfbe22087319af01105dbdc17ad951f56ab Mon Sep 17 00:00:00 2001 From: micah Date: Sat, 8 Apr 2006 20:52:51 +0000 Subject: [PATCH 15/16] backslashes for the double quotes are necessary in the debug lines otherwise when you run a test run it will print: debug su $user -c "$execstr" instead of expanding those variables the backslashes in the output= lines were wrong, but the debug lines were necessary :) git-svn-id: http://code.autistici.org/svn/backupninja/trunk@382 758a04ac-41e6-0310-8a23-8373a73cc35d --- handlers/mysql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handlers/mysql b/handlers/mysql index 2dcf2d5..52193f4 100644 --- a/handlers/mysql +++ b/handlers/mysql @@ -179,7 +179,7 @@ then else execstr="$MYSQLHOTCOPY --quiet --allowold --regexp /.\*/./.\*/ $hotdir" fi - debug 'su $user -c "$execstr"' + debug "su $user -c \"$execstr\"" if [ ! $test ] then output=`su $user -c "$execstr" 2>&1` @@ -202,7 +202,7 @@ then else execstr="$MYSQLHOTCOPY --allowold $db $hotdir" fi - debug 'su $user -c "$execstr"' + debug 'su $user -c \"$execstr\"' if [ ! $test ] then output=`su $user -c "$execstr" 2>&1` @@ -253,7 +253,7 @@ fi else execstr="$MYSQLDUMP $defaultsfile --lock-tables --complete-insert --add-drop-table --quick --quote-names $ignore $db > $dumpdir/${db}.sql" fi - debug 'su $user -c "$execstr"' + debug "su $user -c \"$execstr\"" if [ ! $test ] then output=`su $user -c "$execstr" 2>&1` -- 2.30.2 From 987d4846bb592608cb797588732542a35f09113d Mon Sep 17 00:00:00 2001 From: micah Date: Wed, 12 Apr 2006 21:06:34 +0000 Subject: [PATCH 16/16] Changed cron.d permissions to 644 git-svn-id: http://code.autistici.org/svn/backupninja/trunk@383 758a04ac-41e6-0310-8a23-8373a73cc35d --- ChangeLog | 1 + etc/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b1db818..6cf8898 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ version 0.9.4 -- unreleased vserver: . init_vservers: fixed Debian bug #351083 (improper readlink syntax) . found_vservers: escaped special grep repetition character + + changed cron permissions to 644 minor documentation fixes version 0.9.3 -- February 1st, 2006 diff --git a/etc/Makefile.am b/etc/Makefile.am index 31a3e13..a90eb98 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -22,7 +22,7 @@ edit = sed \ cron.d/backupninja: cron.d/backupninja.in rm -f cron.d/backupninja $(edit) cron.d/backupninja.in > cron.d/backupninja - chmod ugo+x cron.d/backupninja + chmod 644 cron.d/backupninja logrotate.d/backupninja: logrotate.d/backupninja.in rm -f logrotate.d/backupninja -- 2.30.2