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
d747ee2c
Commit
d747ee2c
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
support "never" for prune-after, verify-after
parent
5dc7370c
No related branches found
No related tags found
1 merge request
!124
6725 optimize restic backup params
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/30_Configuration/30_Filetransfer.md
+26
-0
26 additions, 0 deletions
docs/30_Configuration/30_Filetransfer.md
jobs/transfer.job.dist
+2
-1
2 additions, 1 deletion
jobs/transfer.job.dist
transfer.sh
+9
-2
9 additions, 2 deletions
transfer.sh
with
37 additions
and
3 deletions
docs/30_Configuration/30_Filetransfer.md
+
26
−
0
View file @
d747ee2c
...
...
@@ -83,6 +83,32 @@ When restoring data ... this is the path for restored files:
`restore-path = /restore`
### Prune, Verify
After a transfer you can apply a verify or prune action.
To execute them after each run (which is not needed) set its values to 0.
```
txt
prune-after = 0
verify-after = 0
```
You can execute prune and verify only if it didn't run for N days. Set an integer in days here:
```
txt
prune-after = 3
verify-after = 7
```
You can disable it to run it as an extra job using verify.sh or prune.sh.
You must disable prune-after if you use rest:https to a restic rest server with enabled append-only option.
```
txt
prune-after = never
verify-after = 7
```
### Duplicity settings ###
When writing backup data duplicity creates the target file and a index.
...
...
This diff is collapsed.
Click to expand it.
jobs/transfer.job.dist
+
2
−
1
View file @
d747ee2c
...
...
@@ -109,7 +109,8 @@ restore-path = /restore
# ----------------------------------------------------------------------
# number of days when to prune and verify backup.
# set it to 0 to run prune and verify in each backup run.
# set it to 0 to run prune and verify in each backup
# set it to "never" to disable it during backup and execute it outside the backup run.
prune-after = 3
verify-after = 7
...
...
This diff is collapsed.
Click to expand it.
transfer.sh
+
9
−
2
View file @
d747ee2c
...
...
@@ -38,6 +38,7 @@
# 2022-11-04 ah v2.8 rename hooks
# 2022-11-07 ah v2.9 run brefore-transfer hook after registration
# 2023-02-22 ah v2.10 fix touch of last_backup
# 2024-02-02 ah v2.11 support "never" for prune-after, verify-after
# ================================================================================
...
...
@@ -141,8 +142,13 @@ function setAction(){
local
action
=
$1
local
myfile
=
$2
typeset
-i
local
iLimit
iLimit
=
$(
_j_getvar
${
STORAGEFILE
}
"
$action
-after"
)
local
iLimit
iLimit
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
action
}
-after"
)
if
[
"
$iLimit
"
=
"never"
]
;
then
echo
"Info:
$action
is set to [never] and is disabled."
doValue
=
0
return
fi
if
[
!
-f
"
${
myfile
}
"
]
;
then
echo
"Info:
$action
is ENABLED - no last
$action
detected"
...
...
@@ -226,6 +232,7 @@ function setAction(){
echo
fi
exit
.
$(
dirname
$0
)
/plugins/transfer/
$STORAGE_BIN
.sh
||
exit
1
# --------------------------------------------------------------------------------
...
...
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