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

prune and verify after dir handling

parent 708a2d97
No related branches found
No related tags found
1 merge request!78prune and verify after dir handling
...@@ -174,9 +174,9 @@ ...@@ -174,9 +174,9 @@
fi fi
} }
# forget old data # prune old data
# uses global vars from ../../transfer.sh # uses global vars from ../../transfer.sh
function t_backupDoForget(){ function t_backupDoPrune(){
echo "--- FORGET some data" echo "--- FORGET some data"
cmd="duplicity remove-older-than $STORAGE_KEEP --force ${ARGS_DEFAULT} ${STORAGE_TARGETPATH}" cmd="duplicity remove-older-than $STORAGE_KEEP --force ${ARGS_DEFAULT} ${STORAGE_TARGETPATH}"
echo $cmd echo $cmd
...@@ -187,11 +187,6 @@ ...@@ -187,11 +187,6 @@
t_rcCheckCleanup $myrc 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 # verify backup data
# uses global vars from ../../transfer.sh # uses global vars from ../../transfer.sh
function t_backupDoVerify(){ function t_backupDoVerify(){
......
...@@ -170,11 +170,12 @@ ...@@ -170,11 +170,12 @@
echo 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 _tag=$( _j_getvar ${STORAGEFILE} "${CFGPREFIX}tag")
local _mycmd="restic forget \ local _mycmd="restic forget \
...@@ -182,7 +183,6 @@ ...@@ -182,7 +183,6 @@
--tag $_tag \ --tag $_tag \
--group-by paths,tags \ --group-by paths,tags \
--prune \ --prune \
--path ${BACKUP_DIR} \
--cleanup-cache" --cleanup-cache"
local _keep local _keep
...@@ -203,13 +203,9 @@ ...@@ -203,13 +203,9 @@
t_rcCheckCleanup $_myrc t_rcCheckCleanup $_myrc
echo echo
}
# prune old data
# uses global vars from ../../transfer.sh
function t_backupDoPrune(){
# -------------------- # --------------------
echo "--- PRUNE" echo "--- PRUNE (whole repository)"
_mycmd="restic prune ${ARGS_DEFAULT}" _mycmd="restic prune ${ARGS_DEFAULT}"
echo $_mycmd echo $_mycmd
sleep 3 sleep 3
...@@ -225,7 +221,7 @@ ...@@ -225,7 +221,7 @@
# uses global vars from ../../transfer.sh # uses global vars from ../../transfer.sh
function t_backupDoVerify(){ function t_backupDoVerify(){
# -------------------- # --------------------
echo "--- VERIFY" echo "--- VERIFY (whole repository)"
# param --read-data takes a long time. Maybe use an extra job with it. # 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="time restic check ${ARGS_DEFAULT} --with-cache --read-data"
_mycmd="restic check ${ARGS_DEFAULT}" _mycmd="restic check ${ARGS_DEFAULT}"
......
...@@ -405,16 +405,6 @@ function setAction(){ ...@@ -405,16 +405,6 @@ function setAction(){
touch ${lastbackupfile} touch ${lastbackupfile}
fi 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 else
color warning color warning
echo "DIR SKIP $mydir ... does not exist (no error)" 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