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

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

prune and verify are non directory based

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