Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iml-backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
IML Open Source
iml-backup
Commits
28a5b728
Commit
28a5b728
authored
3 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
restic prune: add keep-last; add --cleanup-cache
parent
288ac3d6
No related branches found
No related tags found
1 merge request
!32
5046 finetune restic params
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/30_Configuration/30_Filetransfer.md
+3
-0
3 additions, 0 deletions
docs/30_Configuration/30_Filetransfer.md
jobs/transfer.job.dist
+1
-0
1 addition, 0 deletions
jobs/transfer.job.dist
plugins/transfer/restic.sh
+13
-12
13 additions, 12 deletions
plugins/transfer/restic.sh
with
17 additions
and
12 deletions
docs/30_Configuration/30_Filetransfer.md
+
3
−
0
View file @
28a5b728
...
@@ -172,8 +172,11 @@ is a full backup and all following runs make an incremental backup.
...
@@ -172,8 +172,11 @@ is a full backup and all following runs make an incremental backup.
You have the possibility to keep all younger backups and have the possibility to delete
You have the possibility to keep all younger backups and have the possibility to delete
older backups but to keep N weekly, monthly and yearly snapshots.
older backups but to keep N weekly, monthly and yearly snapshots.
The value for "keep-last" never deletes the last N most recent snapshots.
```
text
```
text
# prune
# prune
restic_keep-last = 5
restic_keep-hourly = 100
restic_keep-hourly = 100
restic_keep-daily = 90
restic_keep-daily = 90
restic_keep-weekly = 12
restic_keep-weekly = 12
...
...
This diff is collapsed.
Click to expand it.
jobs/transfer.job.dist
+
1
−
0
View file @
28a5b728
...
@@ -147,6 +147,7 @@ restic_tag = imlbackup
...
@@ -147,6 +147,7 @@ restic_tag = imlbackup
restic_mountpoint = /mnt/restore
restic_mountpoint = /mnt/restore
# prune
# prune
restic_keep-last = 5
restic_keep-hourly = 100
restic_keep-hourly = 100
restic_keep-daily = 90
restic_keep-daily = 90
restic_keep-weekly = 12
restic_keep-weekly = 12
...
...
This diff is collapsed.
Click to expand it.
plugins/transfer/restic.sh
+
13
−
12
View file @
28a5b728
...
@@ -160,23 +160,24 @@
...
@@ -160,23 +160,24 @@
echo
"--- PRUNE"
echo
"--- PRUNE"
local
_tag
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
tag"
)
local
_tag
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
tag"
)
local
_keep_h
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
keep-hourly"
)
local
_keep_d
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
keep-daily"
)
local
_keep_w
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
keep-weekly"
)
local
_keep_m
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
keep-monthly"
)
local
_keep_y
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
keep-yearly"
)
local
_mycmd
=
"restic forget
\
local
_mycmd
=
"restic forget
\
${
ARGS_DEFAULT
}
\
${
ARGS_DEFAULT
}
\
--tag
$_tag
\
--tag
$_tag
\
--group-by "
paths,tags
"
\
--group-by paths,tags
\
--keep-hourly
$_keep_h
\
--cleanup-cache"
--keep-daily
$_keep_d
\
--keep-weekly
$_keep_w
\
local
_keep
--keep-monthly
$_keep_m
\
for
mykeep
in
last hourly daily weekly monthly yearly
--keep-yearly
$_keep_y
"
do
_keep
=
$(
_j_getvar
"
${
STORAGEFILE
}
"
"
${
CFGPREFIX
}
keep-
${
mykeep
}
"
)
if
[
-n
"
$_keep
"
]
;
then
_mycmd
=
"
${
_mycmd
}
--keep-
${
mykeep
}
${
_keep
}
"
fi
done
echo
$_mycmd
echo
$_mycmd
sleep
3
color cmd
color cmd
eval
$_mycmd
eval
$_mycmd
local
_myrc
=
$?
local
_myrc
=
$?
...
...
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