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
02b6d883
Commit
02b6d883
authored
7 years ago
by
Benzhaomin
Committed by
Jérôme Charaoui
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[borg] fixed pruning in test mode, don't actually run anything
parent
15cea5ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!10
Borg support (rebased)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
handlers/borg.in
+11
-9
11 additions, 9 deletions
handlers/borg.in
with
11 additions
and
9 deletions
handlers/borg.in
+
11
−
9
View file @
02b6d883
...
...
@@ -97,8 +97,8 @@ set +o noglob
# include client-part and server-part
execstr
=
"
${
execstr
}
${
excludes
}
$execstr_repository
::
$execstr_archive
${
includes
}
"
debug
"
$execstr
"
if
[
$test
=
0
]
;
then
output
=
`
nice
-n
$nicelevel
su
-c
"
$execstr
"
2>&1
`
if
[
$?
=
0
]
;
then
...
...
@@ -114,15 +114,17 @@ fi
# borg prune
prunestr
=
"borg prune --keep-daily
$keepdaily
--keep-weekly
$keepweekly
--keep-monthly
$keepmonthly
$execstr_repository
"
debug
"
$prunestr
"
output
=
"
`
su
-c
"
$prunestr
"
2>&1
`
"
if
[
$?
=
0
]
;
then
debug
$output
info
"Removing old backups succeeded."
else
warning
$output
warning
"Failed removing old backups."
if
[
$test
=
0
]
;
then
output
=
"
`
su
-c
"
$prunestr
"
2>&1
`
"
if
[
$?
=
0
]
;
then
debug
$output
info
"Removing old backups succeeded."
else
warning
$output
warning
"Failed removing old backups."
fi
fi
return
0
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