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

fix handling restic_nocache

parent 6caea7f6
Branches
No related tags found
1 merge request!72Fix no cache
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment