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

backup diff: detect initial backup

parent a1906589
No related branches found
No related tags found
1 merge request!325046 finetune restic params
...@@ -207,14 +207,20 @@ ...@@ -207,14 +207,20 @@
local _snapshotNow local _snapshotNow
# get list of snapshots and filter the lines with a date YYYY-MM-DD # 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 -2 ) _data=$( t_restoreDoShowVolumes | grep "[12][0-9][0-9][0-1]-[0-2][0-9]-[0-3][0-9]" | tail -5 )
echo "..."
_snapshotLast=$( echo "$_data" | head -1 | cut -f 1 -d " ")
_snapshotNow=$( echo "$_data" | tail -1 | cut -f 1 -d " ")
echo "$_data" echo "$_data"
color cmd
restic diff "${_snapshotLast}" "${_snapshotNow}" _snapshotLast=$( echo "$_data" | tail -2 | head -1 | cut -f 1 -d " ")
color reset _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 echo
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment