Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
backupninja
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lyz
backupninja
Commits
02a7436b
Commit
02a7436b
authored
17 years ago
by
micah
Browse files
Options
Downloads
Patches
Plain Diff
added ignore_version option to rdiff handler to enable you override the version check
parent
796e77ab
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+3
-2
3 additions, 2 deletions
ChangeLog
examples/example.rdiff
+10
-0
10 additions, 0 deletions
examples/example.rdiff
handlers/rdiff.in
+9
-7
9 additions, 7 deletions
handlers/rdiff.in
with
22 additions
and
9 deletions
ChangeLog
+
3
−
2
View file @
02a7436b
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
examples/example.rdiff
+
10
−
0
View file @
02a7436b
...
...
@@ -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)
...
...
This diff is collapsed.
Click to expand it.
handlers/rdiff.in
+
9
−
7
View file @
02a7436b
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment