Skip to content
Snippets Groups Projects
Commit eedd0e15 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

add restic_prune-params

parent 9b94dd5f
Branches
No related tags found
1 merge request!121add restic_prune-params
......@@ -163,6 +163,8 @@ restic_keep-weekly = 12
restic_keep-monthly = 12
restic_keep-yearly = 10
restic_prune-params = --max-unused unlimited --max-repack-size 1G --cleanup-cache
# ----------------------------------------------------------------------
```
......@@ -279,6 +281,8 @@ restic_keep-within = 6m
# restic_keep-weekly = 12
# restic_keep-monthly = 12
# restic_keep-yearly = 10
restic_prune-params = --max-unused unlimited --max-repack-size 1G --cleanup-cache
```
For pruning with restic forget the following values can be used.
......@@ -292,6 +296,9 @@ See the docs for more details to the keep values of the forget command <https://
* restic_keep-within-(hourly|daily|weekly|monthly|yearly) [duration] - keep snapshots of given period that are newer than duration (eg. 1y5m7d2h) relative to the latest snapshot
* restic_keep-tag [taglist] - keep snapshots with this taglist (can be specified only one in imlbackup) (default [])
* restic_prune-params [options] - additional prune options. see `restic prune help`
## restore-path
Default path where to put restored file when running *restore.sh*.
......
......@@ -163,4 +163,6 @@ restic_keep-within = 6m
# restic_keep-monthly = 12
# restic_keep-yearly = 10
restic_prune-params = --max-unused unlimited --max-repack-size 1G --cleanup-cache
# ----------------------------------------------------------------------
......@@ -189,19 +189,19 @@
local _mycmd="forget \
--tag $_tag \
--group-by paths,tags \
--prune \
--max-unused unlimited \
--cleanup-cache"
--prune "
local _keep
for mykeep in last hourly daily weekly monthly yearly within within-hourly within-daily within-weekly within-monthly within-yearly tag
do
_keep=$( _j_getvar "${STORAGEFILE}" "${CFGPREFIX}keep-${mykeep}")
if [ -n "$_keep" ]; then
_mycmd="${_mycmd} --keep-${mykeep} ${_keep}"
_mycmd+="--keep-${mykeep} ${_keep} "
fi
done
_mycmd+=$( _j_getvar "${STORAGEFILE}" "restic_prune-params")
_restic "$_mycmd"
_myrc=$?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment