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
1cc50d05
Commit
1cc50d05
authored
2 months ago
by
Guillaume Subiron
Browse files
Options
Downloads
Patches
Plain Diff
borg: add keephourly, keepdaily, keepweekly and keepmonthly variables
parent
1d7e00fa
No related branches found
Branches containing commit
No related tags found
1 merge request
!69
Multiple improvements in borg handler
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/example.borg
+10
-0
10 additions, 0 deletions
examples/example.borg
handlers/borg.in
+16
-0
16 additions, 0 deletions
handlers/borg.in
with
26 additions
and
0 deletions
examples/example.borg
+
10
−
0
View file @
1cc50d05
...
...
@@ -130,6 +130,16 @@ exclude = /var/lib/mysql
## Default:
# keep = 30d
## define hourly, daily, weekly and monthly retention for the "borg prune" operation.
##
## theses options will be ignored if set to 0
##
## Default:
## keephourly = 0
## keepdaily = 0
## keepweekly = 0
## keepmonthly = 0
## define extra command-line options for the "borg prune" operation.
##
## Example:
...
...
This diff is collapsed.
Click to expand it.
handlers/borg.in
+
16
−
0
View file @
1cc50d05
...
...
@@ -41,6 +41,10 @@ getconf exclude
getconf create_options
getconf prune
yes
getconf keep 30d
getconf keephourly 0
getconf keepdaily 0
getconf keepweekly 0
getconf keepmonthly 0
getconf prune_options
getconf cache_directory
getconf filter_warnings
yes
...
...
@@ -240,6 +244,18 @@ if [ "$prune" == "yes" ]; then
if
[
!
"
$keep
"
==
"0"
]
;
then
prune_options
=
"
${
prune_options
}
--keep-within=
${
keep
}
"
fi
if
[
!
"
$keephourly
"
==
"0"
]
;
then
prune_options
=
"
${
prune_options
}
--keep-hourly=
${
keephourly
}
"
fi
if
[
!
"
$keepdaily
"
==
"0"
]
;
then
prune_options
=
"
${
prune_options
}
--keep-daily=
${
keepdaily
}
"
fi
if
[
!
"
$keepweekly
"
==
"0"
]
;
then
prune_options
=
"
${
prune_options
}
--keep-weekly=
${
keepweekly
}
"
fi
if
[
!
"
$keepmonthly
"
==
"0"
]
;
then
prune_options
=
"
${
prune_options
}
--keep-monthly=
${
keepmonthly
}
"
fi
prunestr
=
"borg prune
$options
$prune_options
$execstr_repository
"
debug
"executing borg prune"
debug
"
$prunestr
"
...
...
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