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
Custom issue tracker
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
Liberate
backupninja
Commits
a1c2229e
Commit
a1c2229e
authored
14 years ago
by
Olivier Berger
Browse files
Options
Downloads
Patches
Plain Diff
Proposed feature to address
https://labs.riseup.net/code/issues/2492
parent
6aca9c82
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+3
-0
3 additions, 0 deletions
ChangeLog
handlers/dup.helper.in
+12
-2
12 additions, 2 deletions
handlers/dup.helper.in
handlers/dup.in
+25
-0
25 additions, 0 deletions
handlers/dup.in
with
40 additions
and
2 deletions
ChangeLog
+
3
−
0
View file @
a1c2229e
...
...
@@ -11,6 +11,9 @@ version 0.9.9 -- UNRELEASED
(Closes Roundup bug #598)
. Remove support for duplicity < 0.4.4. Even etch-backports has
a newer one.
. Now support remove-all-but-n-full command for duplicity >=
0.9.10 to allow removal of increments for older full backups
(Closes #2492)
ldap:
. Fix reliance on bash for pipefail.
mysql:
...
...
This diff is collapsed.
Click to expand it.
handlers/dup.helper.in
+
12
−
2
View file @
a1c2229e
...
...
@@ -124,6 +124,7 @@ do_dup_dest() {
formItem
"keep"
"
$dup_keep
"
formItem
"incremental"
"
$dup_incremental
"
formItem
"increments"
"
$dup_increments
"
formItem
"keepincroffulls"
"
$dup_keepincroffulls
"
formItem
"bandwidthlimit"
"
$dup_bandwidth
"
formItem
"sshoptions"
"
$dup_sshoptions
"
formDisplay
...
...
@@ -141,8 +142,9 @@ do_dup_dest() {
dup_keep
=
${
thereply
[3]
}
dup_incremental
=
${
thereply
[4]
}
dup_increments
=
${
thereply
[5]
}
dup_bandwidth
=
${
thereply
[6]
}
dup_sshoptions
=
${
thereply
[7]
}
dup_keepincroffulls
=
${
thereply
[6]
}
dup_bandwidth
=
${
thereply
[7]
}
dup_sshoptions
=
${
thereply
[8]
}
done
set
+o noglob
...
...
@@ -424,6 +426,14 @@ increments = $dup_increments
#keep = yes
keep =
$dup_keep
# for how many full backups do we keep their later increments ;
# default is all (keep all increments).
# increments for older full backups will be deleted : only the more
# recent ones (count provided) will be kept
#keepincrofulls = all
#keepincrofulls = 6
keepincrofulls =
$dup_keepincroffulls
# full destination URL, in duplicity format; if set, desturl overrides
# sshoptions, destdir, desthost and destuser; it also disables testconnect and
# bandwithlimit. For details, see duplicity manpage, section "URL FORMAT".
...
...
This diff is collapsed.
Click to expand it.
handlers/dup.in
+
25
−
0
View file @
a1c2229e
...
...
@@ -26,6 +26,7 @@ setsection dest
getconf incremental
yes
getconf increments 30
getconf keep 60
getconf keepincroffulls all
getconf desturl
getconf awsaccesskeyid
getconf awssecretaccesskey
...
...
@@ -275,6 +276,30 @@ if [ "$keep" != "yes" ]; then
fi
fi
# remove-all-inc-of-but-n-full : remove increments of older full backups : only keep latest ones
if
[
"
$keep
"
!=
"yes"
]
;
then
if
[
"
$keepincroffulls
"
!=
"all"
]
;
then
if
[
"
$duplicity_major
"
-ge
0
-a
"
$duplicity_minor
"
-ge
9
-a
"
$duplicity_sub
"
-ge
10
]
;
then
debug
"
$precmd
duplicity remove-all-inc-of-but-n-full
$keepincroffulls
--force
$execstr_options
$execstr_serverpart
"
if
[
!
$test
]
;
then
export
PASSPHRASE
=
$password
export
FTP_PASSWORD
=
$ftp_password
output
=
`
nice
-n
$nicelevel
\
su
-c
\
"
$precmd
duplicity remove-all-inc-of-but-n-full
$keepincroffulls
--force
$execstr_options
$execstr_serverpart
2>&1"
`
exit_code
=
$?
if
[
$exit_code
-eq
0
]
;
then
debug
$output
info
"Duplicity remove-all-inc-of-but-n-full finished successfully."
else
debug
$output
warning
"Duplicity remove-all-inc-of-but-n-full failed."
fi
fi
fi
fi
fi
### Backup command
debug
"duplicity
$execstr_command
$execstr_options
$execstr_source
--exclude '**' /
$execstr_serverpart
"
if
[
!
$test
]
;
then
...
...
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