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

added ignore_version option to rdiff handler to enable you override the version check

parent 796e77ab
Branches
Tags
No related merge requests found
......@@ -28,10 +28,11 @@ version 0.9.5 -- unreleased
. Support configuring PGSQLUSER for real, and document it a bit; this
broken support actually prevented pgsql handler to work for VServers
(Closes: #396578)
rdiff:
rdiff-backup:
. Added cstream support to allow for bandwidth limiting
. Handle "keep = yes" to disable old backups removal (Closes: #424633)
. Ignore rdiff-backup minor versions (thanks Sami Haahtinen)
. Add configuration option to allow you to disable the version check
as in some instances this may be an ok scenario (Closes: #424632)
rub
. Fixed typo in rub handler that caused it to not work
. Changed to use lib/vserver code
......
......@@ -20,6 +20,16 @@
## -t option for more information. 62500 bytes = 500 Kb (.5 Mb)
# bwlimit = 62500
## should backupninja ignore the version differences between source and remote
## rdiff-backup? (default: no)
## This could be useful if the version differences between rdiff-backup instances
## on remote and local side are different, and you are certain there are no
## problems in using mis-matched versions and want to get beyond this check.
## An example usage could be the remote side has its authorized_keys configured
## with command="rdiff-backup --server" to allow for restricted yet automated
## password-less backups
# ignore_version = no
######################################################
## source section
## (where the files to be backed up are coming from)
......
......@@ -32,12 +32,12 @@ function get_version() {
# if user or host is missing, returns the local version.
if [ "$#" -lt 2 ]; then
debug "$RDIFFBACKUP -V"
echo `$RDIFFBACKUP -V | cut -d. -f1,2`
echo `$RDIFFBACKUP -V`
else
local user=$1
local host=$2
debug "ssh $sshoptions $host -l $user '$RDIFFBACKUP -V'"
echo `ssh $sshoptions $host -l $user "$RDIFFBACKUP -V | grep rdiff-backup | cut -d. -f1,2"`
echo `ssh $sshoptions $host -l $user "$RDIFFBACKUP -V | grep rdiff-backup"`
fi
}
......@@ -127,11 +127,13 @@ if [ "$testconnect" = "yes" ] || [ "${test}" -eq 1 ]; then
test_connection $destuser $desthost
fi
# see that rdiff-backup has the same version at the source and destination
sourceversion=`get_version $sourceuser $sourcehost`
destversion=`get_version $destuser $desthost`
if [ "$sourceversion" != "$destversion" ]; then
fatal "rdiff-backup does not have the same version at the source and at the destination."
if [ $ignore_version != "yes" ]; then
# see that rdiff-backup has the same version at the source and destination
sourceversion=`get_version $sourceuser $sourcehost`
destversion=`get_version $destuser $desthost`
if [ "$sourceversion" != "$destversion" ]; then
fatal "rdiff-backup does not have the same version at the source and at the destination."
fi
fi
# source specific checks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment