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

Merge branch 'unlock-before-backup' into 'master'

prune and verify after dir handling

See merge request !78
parents 17f9ae8f 362c3e0a
No related branches found
No related tags found
1 merge request!78prune and verify after dir handling
......@@ -174,9 +174,9 @@
fi
}
# forget old data
# prune old data
# uses global vars from ../../transfer.sh
function t_backupDoForget(){
function t_backupDoPrune(){
echo "--- FORGET some data"
cmd="duplicity remove-older-than $STORAGE_KEEP --force ${ARGS_DEFAULT} ${STORAGE_TARGETPATH}"
echo $cmd
......@@ -187,11 +187,6 @@
t_rcCheckCleanup $myrc
}
# prune old data
# uses global vars from ../../transfer.sh
function t_backupDoPrune(){
echo "--- PRUNE is not implemented yet for duplicity."
}
# verify backup data
# uses global vars from ../../transfer.sh
function t_backupDoVerify(){
......
......@@ -170,11 +170,12 @@
echo
}
# forget data
# uses global vars from ../../transfer.sh
function t_backupDoForget(){
echo "--- FORGET some data"
# prune old data
# uses global vars from ../../transfer.sh
function t_backupDoPrune(){
# --------------------
echo "--- FORGET (in all pathes of repository)"
local _tag=$( _j_getvar ${STORAGEFILE} "${CFGPREFIX}tag")
local _mycmd="restic forget \
......@@ -182,7 +183,6 @@
--tag $_tag \
--group-by paths,tags \
--prune \
--path ${BACKUP_DIR} \
--cleanup-cache"
local _keep
......@@ -203,13 +203,9 @@
t_rcCheckCleanup $_myrc
echo
}
# prune old data
# uses global vars from ../../transfer.sh
function t_backupDoPrune(){
# --------------------
echo "--- PRUNE"
echo "--- PRUNE (whole repository)"
_mycmd="restic prune ${ARGS_DEFAULT}"
echo $_mycmd
sleep 3
......@@ -225,7 +221,7 @@
# uses global vars from ../../transfer.sh
function t_backupDoVerify(){
# --------------------
echo "--- VERIFY"
echo "--- VERIFY (whole repository)"
# 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}"
......
......@@ -405,16 +405,6 @@ function setAction(){
touch ${lastbackupfile}
fi
# --- prune
if [ $doPrune -eq 0 ]; then
echo "SKIP forget data"
else
h3 "`date` FORGET data of ${BACKUP_DIR}"
t_backupDoForget
echo
fi
echo
else
color warning
echo "DIR SKIP $mydir ... does not exist (no error)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment