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

prune and verify are non directory based

parent e810ca2d
No related branches found
No related tags found
1 merge request!77prune and verify are non directory based
...@@ -174,9 +174,9 @@ ...@@ -174,9 +174,9 @@
fi fi
} }
# prune old data # forget old data
# uses global vars from ../../transfer.sh # uses global vars from ../../transfer.sh
function t_backupDoPrune(){ function t_backupDoForget(){
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,6 +187,11 @@ ...@@ -187,6 +187,11 @@
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,10 @@ ...@@ -170,11 +170,10 @@
echo echo
} }
# forget data
# prune old data
# uses global vars from ../../transfer.sh # uses global vars from ../../transfer.sh
function t_backupDoPrune(){ function t_backupDoForget(){
# --------------------
echo "--- FORGET some data" echo "--- FORGET some data"
local _tag=$( _j_getvar ${STORAGEFILE} "${CFGPREFIX}tag") local _tag=$( _j_getvar ${STORAGEFILE} "${CFGPREFIX}tag")
...@@ -183,6 +182,7 @@ ...@@ -183,6 +182,7 @@
--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,6 +203,10 @@ ...@@ -203,6 +203,10 @@
t_rcCheckCleanup $_myrc t_rcCheckCleanup $_myrc
echo echo
}
# prune old data
# uses global vars from ../../transfer.sh
function t_backupDoPrune(){
# -------------------- # --------------------
echo "--- PRUNE" echo "--- PRUNE"
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
# 2021-12-02 ah v2.1 added parameter "prune" to cleanup only # 2021-12-02 ah v2.1 added parameter "prune" to cleanup only
# 2022-02-10 ah v2.2 update logging (removing tee) # 2022-02-10 ah v2.2 update logging (removing tee)
# 2022-10-01 ah v2.3 customize prune and verify action # 2022-10-01 ah v2.3 customize prune and verify action
# 2022-10-04 ah v2.4 prune and verify are non directory based
# ================================================================================ # ================================================================================
...@@ -404,11 +405,29 @@ function setAction(){ ...@@ -404,11 +405,29 @@ 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
color warning
echo "DIR SKIP $mydir ... does not exist (no error)"
color reset
fi
echo
done
# --- prune # --- prune
if [ $doPrune -eq 0 ]; then if [ $doPrune -eq 0 ]; then
echo "SKIP prune" echo "SKIP prune"
else else
h3 "`date` PRUNE for ${BACKUP_DIR}" h3 "`date` PRUNE repository data"
t_backupDoPrune t_backupDoPrune
touch ${lastprunefile} touch ${lastprunefile}
echo echo
...@@ -419,21 +438,13 @@ function setAction(){ ...@@ -419,21 +438,13 @@ function setAction(){
if [ $doVerify -eq 0 ]; then if [ $doVerify -eq 0 ]; then
echo "SKIP verify" echo "SKIP verify"
else else
h3 "`date` VERIFY for ${BACKUP_DIR}" h3 "`date` VERIFY repository data"
t_backupDoVerify t_backupDoVerify
touch ${lastverifyfile} touch ${lastverifyfile}
echo echo
fi fi
echo echo
else
color warning
echo "DIR SKIP $mydir ... does not exist (no error)"
color reset
fi
echo
done
echo $rc > ${rcfile} echo $rc > ${rcfile}
exit $rc exit $rc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment