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
52ab345f
Commit
52ab345f
authored
3 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
fix handling restic_nocache
parent
6caea7f6
Branches
Branches containing commit
No related tags found
1 merge request
!72
Fix no cache
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/transfer/restic.sh
+8
-6
8 additions, 6 deletions
plugins/transfer/restic.sh
with
8 additions
and
6 deletions
plugins/transfer/restic.sh
+
8
−
6
View file @
52ab345f
...
...
@@ -12,6 +12,7 @@
# 2022-02-09 ah v0.3 show diff to last backup; update pruning
# 2022-02-09 ah v0.3 update pruning; more keep-params
# 2022-03-07 ah v0.4 add verify in post task
# 2022-05-10 ah v0.5 fix handling with nocache flag (use globally as default param - not in backup only)
# ================================================================================
# --------------------------------------------------------------------------------
...
...
@@ -58,6 +59,12 @@
# verbose to see more details
echo
-n
--verbose
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
verbose"
)
# no cache ... to create no local cache dirs, what saves space but backup + verify is much slower
_nocacheFlag
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
nocache"
)
if
[
"
$_nocacheFlag
"
!=
""
]
&&
[
"
$_nocacheFlag
"
!=
"0"
]
&&
[
"
$_nocacheFlag
"
!=
"false"
]
;
then
echo
-n
"--no-cache "
fi
}
# return a string with backup parameters that will be added to defaults
function
t_getParamBackup
(){
...
...
@@ -70,11 +77,6 @@
echo
-n
"--tag
$_tag
"
fi
# no cache ... to create smaller local cache dirs, but backup 3 times slower
_nocacheFlag
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
nocache"
)
if
[
"
$_nocacheFlag
"
!=
""
]
&&
[
"
$_nocacheFlag
"
!=
"0"
]
&&
[
"
$_nocacheFlag
"
!=
"false"
]
;
then
echo
-n
"--no-cache "
fi
}
# return a cli parameter for a single exlude directory
...
...
@@ -185,7 +187,7 @@
echo
"--- VERIFY"
# param --read-data takes a long time. Maybe use an extra job with it.
# _mycmd="time restic check ${ARGS_DEFAULT} --with-cache --read-data"
_mycmd
=
"restic check
${
ARGS_DEFAULT
}
--with-cache
"
_mycmd
=
"restic check
${
ARGS_DEFAULT
}
"
echo
$_mycmd
sleep
3
color cmd
...
...
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