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
Package registry
Model registry
Operate
Terraform modules
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
raT
backupninja
Commits
dc7f723e
Commit
dc7f723e
authored
14 years ago
by
intrigeri
Browse files
Options
Downloads
Patches
Plain Diff
Remove support for duplicity < 0.4.4. Even etch-backports has a newer one.
parent
55d9452d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+2
-0
2 additions, 0 deletions
ChangeLog
handlers/dup.in
+29
-63
29 additions, 63 deletions
handlers/dup.in
with
31 additions
and
63 deletions
ChangeLog
+
2
−
0
View file @
dc7f723e
...
...
@@ -6,6 +6,8 @@ version 0.9.9 -- UNRELEASED
dup:
. Use --tempdir option rather than TMPDIR environment variable.
(Closes Roundup bug #598)
. Remove support for duplicity < 0.4.4. Even etch-backports has
a newer one.
postgresql:
. Support various pg_dump formats in addition to pg_dumpall.
Thanks to Jacob Anawalt <jlanawalt@gmail.com> for the patch.
...
...
This diff is collapsed.
Click to expand it.
handlers/dup.in
+
29
−
63
View file @
dc7f723e
...
...
@@ -2,7 +2,7 @@
# vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
#
# duplicity script for backupninja
# requires duplicity
# requires duplicity
>= 0.4.4
#
getconf options
...
...
@@ -106,35 +106,14 @@ duplicity_major="`echo $duplicity_version | @AWK@ -F '.' '{print $1}'`"
duplicity_minor
=
"
`
echo
$duplicity_version
| @AWK@
-F
'.'
'{print $2}'
`
"
duplicity_sub
=
"
`
echo
$duplicity_version
| @AWK@
-F
'.'
'{print $3}'
`
"
### ssh/scp/sftp options
# 1. duplicity >= 0.4.2 needs --sftp-command
# (NB: sftp does not support the -l option)
# 2. duplicity 0.4.3 to 0.4.9 replace --ssh-command with --ssh-options, which is
# passed to scp and sftp commands by duplicity. We don't use it: since this
# version does not use the ssh command anymore, we keep compatibility with
# our previous config files by passing $sshoptions to --scp-command and
# --sftp-command ourselves
### ssh/scp/sftp options (duplicity < 0.4.3 is unsupported)
scpoptions
=
"
$sshoptions
"
if
[
"
$bandwidthlimit
"
!=
0
]
;
then
[
-z
"
$desturl
"
]
||
warning
'The bandwidthlimit option is not used when desturl is set.'
scpoptions
=
"
$scpoptions
-l
$bandwidthlimit
"
fi
# < 0.4.2 : only uses ssh and scp
if
[
"
$duplicity_major
"
-le
0
-a
"
$duplicity_minor
"
-le
4
-a
"
$duplicity_sub
"
-lt
2
]
;
then
execstr_options
=
"
${
execstr_options
}
--scp-command 'scp
$scpoptions
' --ssh-command 'ssh
$sshoptions
'"
# >= 0.4.2 : also uses sftp, --sftp-command option is now supported
else
sftpoptions
=
"
$sshoptions
"
# == 0.4.2 : uses ssh, scp and sftp
if
[
"
$duplicity_major
"
-eq
0
-a
"
$duplicity_minor
"
-eq
4
-a
"
$duplicity_sub
"
-eq
2
]
;
then
execstr_options
=
"
${
execstr_options
}
--scp-command 'scp
$scpoptions
' --sftp-command 'sftp
$sftpoptions
' --ssh-command 'ssh
$sshoptions
'"
# >= 0.4.3 : uses only scp and sftp, --ssh-command option is not supported anymore
else
execstr_options
=
"
${
execstr_options
}
--scp-command 'scp
$scpoptions
' --sftp-command 'sftp
$sftpoptions
'"
fi
fi
### Symmetric or asymmetric (public/private key pair) encryption
if
[
-n
"
$encryptkey
"
]
;
then
...
...
@@ -162,12 +141,7 @@ fi
# full backup.
# If incremental==no, force a full backup anyway.
if
[
"
$incremental
"
==
"no"
]
;
then
# before 0.4.4, full was an option and not a command
if
[
"
$duplicity_major
"
-le
0
-a
"
$duplicity_minor
"
-le
4
-a
"
$duplicity_sub
"
-lt
4
]
;
then
execstr_options
=
"
${
execstr_options
}
--full"
else
execstr_command
=
"full"
fi
else
# we're in incremental mode
if
[
"
$increments
"
!=
"keep"
]
;
then
...
...
@@ -210,10 +184,6 @@ if [ "$keep" != "yes" ]; then
if
[
"
`
echo
$keep
|
tr
-d
0-9
`
"
==
""
]
;
then
keep
=
"
${
keep
}
D"
fi
# before 0.4.4, remove-older-than was an option and not a command
if
[
"
$duplicity_major
"
-le
0
-a
"
$duplicity_minor
"
-le
4
-a
"
$duplicity_sub
"
-lt
4
]
;
then
execstr_options
=
"
${
execstr_options
}
--remove-older-than
$keep
"
fi
fi
### Source
...
...
@@ -268,7 +238,6 @@ fi
### Cleanup commands (duplicity >= 0.4.4)
# cleanup
if
[
"
$duplicity_major
"
-ge
0
-a
"
$duplicity_minor
"
-ge
4
-a
"
$duplicity_sub
"
-ge
4
]
;
then
debug
"duplicity cleanup --force
$execstr_options
$execstr_serverpart
"
if
[
!
$test
]
;
then
export
PASSPHRASE
=
$password
...
...
@@ -285,11 +254,9 @@ if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 4 -a "$duplicity_sub" -g
warning
"Duplicity cleanup failed."
fi
fi
fi
# remove-older-than
if
[
"
$keep
"
!=
"yes"
]
;
then
if
[
"
$duplicity_major
"
-ge
0
-a
"
$duplicity_minor
"
-ge
4
-a
"
$duplicity_sub
"
-ge
4
]
;
then
debug
"duplicity remove-older-than
$keep
--force
$execstr_options
$execstr_serverpart
"
if
[
!
$test
]
;
then
export
PASSPHRASE
=
$password
...
...
@@ -307,7 +274,6 @@ if [ "$keep" != "yes" ]; then
fi
fi
fi
fi
### Backup command
debug
"duplicity
$execstr_command
$execstr_options
$execstr_source
--exclude '**' /
$execstr_serverpart
"
...
...
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