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
Guillaume Subiron
backupninja
Commits
b37edd26
Commit
b37edd26
authored
3 months ago
by
Guillaume Subiron
Browse files
Options
Downloads
Patches
Plain Diff
borg: run borg compact after borg prune when borg version > 1.2
parent
1cc50d05
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
handlers/borg.in
+15
-0
15 additions, 0 deletions
handlers/borg.in
with
15 additions
and
0 deletions
handlers/borg.in
+
15
−
0
View file @
b37edd26
...
...
@@ -265,6 +265,21 @@ if [ "$prune" == "yes" ]; then
if
[
$ret
=
0
]
;
then
debug
"
$output
"
info
"Removing old backups succeeded."
if
[[
"
$(
borg
--version
)
"
>
"borg 1.2"
]]
;
then
compactstr
=
"borg compact
$execstr_repository
"
debug
"
$compactstr
"
output
=
"
$(
su
-c
"
$compactstr
"
2>&1
)
"
ret
=
$?
if
[
$ret
=
0
]
;
then
debug
"
$output
"
info
"Compacting borg repository succeeded."
else
info
"
$output
"
warning
"Compacting borg repository failed. Borg returned exit code
${
ret
}
."
fi
fi
elif
[
$ret
=
1
]
;
then
warning
"
$output
"
warning
"Removing old backups finished with warnings."
...
...
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