Skip to content
Snippets Groups Projects

5046 finetune restic params

Merged Hahn Axel (hahn) requested to merge 5046-finetune-restic-params into master

Files

+ 22
14
@@ -138,19 +138,6 @@
# uses global vars from ../../transfer.sh
function t_backupDoPostTasks(){
echo "--- CLEANUP local data:"
echo restic cache --cleanup
color cmd
restic cache --cleanup
local _myrc=$?
color reset
case $_myrc in
0) color ok; echo "OK" ;;
*) color error; echo "Cleanup error - returncode was $_myrc" ;;
esac
color reset
echo
echo "--- UNLOCK ... just in case :-)"
echo restic unlock ${ARGS_DEFAULT}
color cmd
@@ -214,7 +201,28 @@
# post backup actions
# uses global vars from ../../transfer.sh
function t_backupDirDoPostTasks(){
echo "Nothing to do."
echo "--- SHOW CHANGES between last 2 snapshots"
local _data
local _snapshotLast
local _snapshotNow
# get list of snapshots and filter the lines with a date YYYY-MM-DD
_data=$( t_restoreDoShowVolumes | grep "[12][0-9][0-9][0-1]-[0-2][0-9]-[0-3][0-9]" | tail -5 )
echo "..."
echo "$_data"
_snapshotLast=$( echo "$_data" | tail -2 | head -1 | cut -f 1 -d " ")
_snapshotNow=$( echo "$_data" | tail -1 | cut -f 1 -d " ")
if [ "${_snapshotLast}" = "${_snapshotNow}" ]; then
echo "This was the initial (full) Backup"
else
color cmd
restic diff "${_snapshotLast}" "${_snapshotNow}"
color reset
fi
echo
}
# --------------------------------------------------------------------------------
Loading