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
Julien
backupninja
Commits
6a3a8321
Commit
6a3a8321
authored
7 years ago
by
Jérôme Charaoui
Browse files
Options
Downloads
Patches
Plain Diff
[borg] build/debug prunestr only if prune = yes
parent
54cc8c6b
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
+12
-11
12 additions, 11 deletions
handlers/borg.in
with
12 additions
and
11 deletions
handlers/borg.in
+
12
−
11
View file @
6a3a8321
...
@@ -151,10 +151,10 @@ fi
...
@@ -151,10 +151,10 @@ fi
### REMOVE OLD BACKUPS ###
### REMOVE OLD BACKUPS ###
# borg prune
# borg prune
if
[
"
$prune
"
==
"yes"
]
;
then
prunestr
=
"borg prune --keep-hourly
$keephourly
--keep-daily
$keepdaily
--keep-weekly
$keepweekly
--keep-monthly
$keepmonthly
$execstr_repository
"
prunestr
=
"borg prune --keep-hourly
$keephourly
--keep-daily
$keepdaily
--keep-weekly
$keepweekly
--keep-monthly
$keepmonthly
$execstr_repository
"
debug
"
$prunestr
"
debug
"
$prunestr
"
if
[
$test
=
0
]
;
then
if
[
$test
=
0
]
&&
[
"
$prune
"
==
"yes"
]
;
then
output
=
"
`
su
-c
"
$prunestr
"
2>&1
`
"
output
=
"
`
su
-c
"
$prunestr
"
2>&1
`
"
if
[
$?
=
0
]
;
then
if
[
$?
=
0
]
;
then
debug
$output
debug
$output
...
@@ -164,6 +164,7 @@ if [ $test = 0 ] && [ "$prune" == "yes" ]; then
...
@@ -164,6 +164,7 @@ if [ $test = 0 ] && [ "$prune" == "yes" ]; then
warning
"Failed removing old backups."
warning
"Failed removing old backups."
fi
fi
fi
fi
fi
unset
BORG_PASSPHRASE
unset
BORG_PASSPHRASE
...
...
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