Skip to content
Snippets Groups Projects
Commit 6d6d041b authored by micah's avatar micah :speech_balloon:
Browse files

Added changes from rhatto

parent a4360a23
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,9 @@ version 0.9.4 -- unreleased ...@@ -19,6 +19,9 @@ version 0.9.4 -- unreleased
Added rsnap handler: Added rsnap handler:
. rotated rsync snapshops . rotated rsync snapshops
. code from paulv@bikkel.org . code from paulv@bikkel.org
Added rub handler:
. alternative to rsnap
. code from rhatto@riseup.net
mysql: mysql:
. Fixed improper use of $vuserhome (Closes: #351083) . Fixed improper use of $vuserhome (Closes: #351083)
. Fixed erroneous removal of tmpfile when it didn't exit . Fixed erroneous removal of tmpfile when it didn't exit
...@@ -42,6 +45,11 @@ version 0.9.4 -- unreleased ...@@ -42,6 +45,11 @@ version 0.9.4 -- unreleased
. Fixed improper include/exclude symlink dereference . Fixed improper include/exclude symlink dereference
. Removed overzealous vsnames check . Removed overzealous vsnames check
. Now works if testconnect=no and if $test is not defined. . Now works if testconnect=no and if $test is not defined.
. add $sshoptions config parameter in [dest] section of config so
connections to ports other than 22 can be made by adding the
following to the top of the handler config:
options = --remote-schema 'ssh -p REMOTE-PORT -C %s rdiff-backup
--server'
dup: dup:
. Symlink and globbing support enhancement and clarification: for . Symlink and globbing support enhancement and clarification: for
a given include/exclude/vsinclude statement, dup handler now a given include/exclude/vsinclude statement, dup handler now
...@@ -57,6 +65,8 @@ version 0.9.4 -- unreleased ...@@ -57,6 +65,8 @@ version 0.9.4 -- unreleased
. Added warning if no devices were found (thanks Ranier Zocholl) . Added warning if no devices were found (thanks Ranier Zocholl)
ldap: ldap:
. Compress now happens in-line to save some disk space (Closes: #370778) . Compress now happens in-line to save some disk space (Closes: #370778)
makecd:
. Added nicelevel option (thanks rhatto)
lib changes lib changes
vserver: vserver:
. init_vservers: fixed Debian bug #351083 (improper readlink syntax) . init_vservers: fixed Debian bug #351083 (improper readlink syntax)
......
...@@ -10,6 +10,7 @@ getconf system no ...@@ -10,6 +10,7 @@ getconf system no
getconf isoonly yes getconf isoonly yes
getconf imagefile backup.iso getconf imagefile backup.iso
getconf device getconf device
getconf nicelevel 0
# define needed executables: # define needed executables:
MKISOFS="/usr/bin/mkisofs" MKISOFS="/usr/bin/mkisofs"
...@@ -35,7 +36,7 @@ if [ "$isoonly" == "no" ]; then ...@@ -35,7 +36,7 @@ if [ "$isoonly" == "no" ]; then
fi fi
outputfile="$backupdir/$imagefile" outputfile="$backupdir/$imagefile"
execstr="$MKISOFS --quiet -R -o $outputfile " execstr="nice -n $nicelevel $MKISOFS --quiet -R -o $outputfile "
str="" str=""
# excludes # excludes
......
...@@ -17,8 +17,8 @@ function test_connection() { ...@@ -17,8 +17,8 @@ function test_connection() {
fi fi
local user=$1 local user=$1
local host=$2 local host=$2
debug "ssh -o PasswordAuthentication=no $host -l $user 'echo -n 1'" debug "ssh $sshoptions -o PasswordAuthentication=no $host -l $user 'echo -n 1'"
local ret=`ssh -o PasswordAuthentication=no $host -l $user 'echo -n host is alive'` local ret=`ssh $sshoptions -o PasswordAuthentication=no $host -l $user 'echo -n host is alive'`
if echo $ret | grep "host is alive"; then if echo $ret | grep "host is alive"; then
debug "Connected to $host as $user successfully" debug "Connected to $host as $user successfully"
else else
...@@ -36,8 +36,8 @@ function get_version() { ...@@ -36,8 +36,8 @@ function get_version() {
else else
local user=$1 local user=$1
local host=$2 local host=$2
debug "ssh $host -l $user '$RDIFFBACKUP -V'" debug "ssh $sshoptions $host -l $user '$RDIFFBACKUP -V'"
echo `ssh $host -l $user "$RDIFFBACKUP -V | grep rdiff-backup"` echo `ssh $sshoptions $host -l $user "$RDIFFBACKUP -V | grep rdiff-backup"`
fi fi
} }
...@@ -89,6 +89,7 @@ destdir=${destdir%/} ...@@ -89,6 +89,7 @@ destdir=${destdir%/}
getconf type; desttype=$type getconf type; desttype=$type
getconf user; destuser=$user getconf user; destuser=$user
getconf host; desthost=$host getconf host; desthost=$host
getconf sshoptions
check_consistency "destination" "$type" "$user" "$host" check_consistency "destination" "$type" "$user" "$host"
### CHECK CONFIG ### ### CHECK CONFIG ###
...@@ -148,7 +149,7 @@ if [ "`echo $keep | tr -d 0-9`" == "" ]; then ...@@ -148,7 +149,7 @@ if [ "`echo $keep | tr -d 0-9`" == "" ]; then
keep="${keep}D" keep="${keep}D"
fi fi
removestr="$RDIFFBACKUP --force --remove-older-than $keep " removestr="$RDIFFBACKUP $options --force --remove-older-than $keep "
if [ "$desttype" == "remote" ]; then if [ "$desttype" == "remote" ]; then
removestr="${removestr}${destuser}@${desthost}::" removestr="${removestr}${destuser}@${desthost}::"
fi fi
...@@ -156,7 +157,7 @@ removestr="${removestr}${destdir}/${label}"; ...@@ -156,7 +157,7 @@ removestr="${removestr}${destdir}/${label}";
debug "$removestr" debug "$removestr"
if [ $test = 0 ]; then if [ $test = 0 ]; then
output=`$removestr 2>&1` output="`su -c "$removestr" 2>&1`"
if [ $? = 0 ]; then if [ $? = 0 ]; then
debug $output debug $output
info "Removing backups older than $keep days succeeded." info "Removing backups older than $keep days succeeded."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment