Skip to content

Commit

Permalink
v8.25
Browse files Browse the repository at this point in the history
- DietPi-Backup | Resolved an issue where updating or restoring backups between different distro version may have been incomplete (particularly in case of Bookworm and Bullseye), since the /etc/debian_version is identical in size and mtime, and hence seen as identical by rsync (by default), while its content is different.
  • Loading branch information
MichaIng committed Dec 7, 2023
1 parent ac7e7ec commit b98c7bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Enhancements:
Bug fixes:
- Proxmox | Now really resolved the issue where the QEMU guest agent was not always installed automatically on first boot.
- DietPi-Update | Resolved an issue on RPi 4 systems with 32-bit userland/OS (but 64-bit kernel enabled) where wrong package variants could have been installed during patch stages. Many thanks to @diment08 for reporting this issue: https://github.com/MichaIng/DietPi/issues/6768
- DietPi-Backup | Resolved an issue where updating or restoring backups between different distro version may have been incomplete (particularly in case of Bookworm and Bullseye), since the /etc/debian_version is identical in size and mtime, and hence seen as identical by rsync (by default), while its content is different.
- DietPi-Software | Ampache: Resolved an issue on Bullseye and Bookworm systems where the initial web UI access failed because our pre-generated database was too old. A template shipped with Ampache will now be used, the initial admin user and music catalogue added via CLI. Many thanks to @mostly_offline for reporting this issue: https://dietpi.com/forum/t/bypassing-ampache-update-page/17367

As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME
Expand Down
9 changes: 9 additions & 0 deletions dietpi/dietpi-backup
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ However, this check is a rough estimation in reasonable time, thus it could be m
rsync "${aRSYNC_RUN_OPTIONS_BACKUP[@]}" -v --log-file="$FP_TARGET/$FP_LOG" "$FP_SOURCE" "$FP_TARGET/data/"
EXIT_CODE=$?

# Manually backup /etc/debian_release, since it can have same size and mtime between different Debian version, hence backing up e.g. a Bookworm system onto an existing Bullseye backup won't include this critical file.
# - The alternative would be "-c" to compare checksums, but this can increases the duration significantly.
G_EXEC cp -a "${FP_SOURCE}etc/debian_release" "$FP_TARGET/$DATA/etc/debian_release"


# touch target directory to show the correct last update timestamp when restoring one of multiple backups from the archive. This needs to be done after the backup since it applies the root / timestamps.
G_EXEC touch "$FP_TARGET/data"

Expand Down Expand Up @@ -388,6 +393,10 @@ However, this check is a rough estimation in reasonable time, thus it could be m
rsync "${aRSYNC_RUN_OPTIONS_RESTORE[@]}" -v --log-file="$FP_TARGET/$FP_LOG" "$FP_TARGET/$DATA/" "$FP_SOURCE"
EXIT_CODE=$?

# Manually restore /etc/debian_release, since it can have same size and mtime between different Debian version, hence restoring e.g. a Bullseye system on Bookworm won't restore this critical file.
# - The alternative would be "-c" to compare checksums, but this can increases the duration significantly.
G_EXEC cp -a "$FP_TARGET/$DATA/etc/debian_release" "${FP_SOURCE}etc/debian_release"

hash -r # Clear PATH cache
(( $UPDATE_UUIDs )) && Update_UUIDs

Expand Down

0 comments on commit b98c7bd

Please sign in to comment.