diff --git a/plugins/transfer/restic.sh b/plugins/transfer/restic.sh index 3433874828e22b0bf1661d914c262cfed092b323..338849d543218b4a9589aa5c2b5991395b1496e5 100644 --- a/plugins/transfer/restic.sh +++ b/plugins/transfer/restic.sh @@ -207,14 +207,20 @@ 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 -2 ) - - _snapshotLast=$( echo "$_data" | head -1 | cut -f 1 -d " ") - _snapshotNow=$( echo "$_data" | tail -1 | cut -f 1 -d " ") + _data=$( t_restoreDoShowVolumes | grep "[12][0-9][0-9][0-1]-[0-2][0-9]-[0-3][0-9]" | tail -5 ) + echo "..." echo "$_data" - color cmd - restic diff "${_snapshotLast}" "${_snapshotNow}" - color reset + + _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 }