diff --git a/CHANGELOG.md b/CHANGELOG.md index ab35a1b..2f43e02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [7.3.4] - 2022-04-29 +### Fixed +- Backup stats notifications: fix issue where `restic snapshots --latest 2` will show more than two snapshots due to different backup paths used. + ## [7.3.3] - 2022-04-14 ### Fixed - Trying to fix broken Homebrew bottles due to GitHub API issues. diff --git a/bin/restic_backup.sh b/bin/restic_backup.sh index d84d742..20cbfe1 100644 --- a/bin/restic_backup.sh +++ b/bin/restic_backup.sh @@ -115,6 +115,7 @@ if [ "$RESTIC_NOTIFY_BACKUP_STATS" = true ]; then latest_snapshot_diff=$(restic snapshots --tag "$RESTIC_BACKUP_TAG" --latest 2 --compact \ | grep -Ei "^[abcdef0-9]{8} " \ | awk '{print $1}' \ + | tail -2 \ | tr '\n' ' ' \ | xargs restic diff) added=$(echo "$latest_snapshot_diff" | grep -i 'added:' | awk '{print $2 " " $3}')