This one turned into a pretty big release, with the new functionality being added in relation to how errors are communicated back on screen after backups run, or when looking at the setup/configuration menu. Also the addition of piping all errors to its own dedicated error log should really help narrow things down when trying to troubleshoot issues. Many thanks to both
@vibroverbus and
@Wendigogo for the suggestions and testing that went into this. Also, some pruning in the code has shaved 90K / 1100 lines of code, making it much more efficient on the backend.
What's new?!
v1.8.4 - (June 9, 2024)
- MINOR: Long overdue for a
major code overhaul, trimming inefficient repetitive code, and created versatile functions out of them. This shaved over 90K off the size of the file by eliminating over 1100 lines of code. BACKUPMON is now leaner, meaner, and more efficient!
- PATCH: Some logging additions being made based on feedback from
@vibroverbus and
@Wendigogo. Now, BACKUPMON will
redirect any stderr error-specific messages into a separate "error log". This log is viewable from the setup/configuration menu using the command "(ve)". It will basically dump any tar-related warnings or any other errors into this log, in addition to the error messages that BACKUPMON generates.
- PATCH: Should any sort of
error occur, you will get
visual feedback in various locations: (1) When manually running a backup job from the menu, it will display the warning that an error occurred and will ask for a keypress to continue. (2) When automatedly running, it will include a warning at the end of the job to let you know something occurred. (3) When opening BACKUPMON to the setup/configuration menu, it will display that an error occurred during the last backup, and to take a look at the error log.
- PATCH: Added
tar file creation and validation routines to the "
Test Your Network Backup Target" option under the setup/configuration menu. Thought these would be good to add to determine if tar is functional in your environment or backup target.
- PATCH: Determined that importing status/errors from tar or nvram commands were no longer working due to the number of pipes being appended to these commands in order to divert errors into the new error log. Implemented a workaround to continue to
flag major networking or tar errors that would cause script execution and flag it as a failed backup.
Download link (or update directly within AMTM/BACKUPMON):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
Significant Screenshots:
When running an automated backup (or scheduled backup), or using the various commands, like: "
sh /jffs/scripts/backupmon.sh
", or just "
backupmon
", or "
sh backupmon.sh -backup
" ... a message appears at the end of the backup to inform you that an error happened:
When running a manual (bk) backup from the setup/config menu, it will prompt for a key-press after displaying the warning that an error happened:
If you didn't happen to catch an error, or do not have AMTM email setup to have it send emails to you when errors happen, a visual warning appears next time you open the setup/configuration menu:
The error log will show all relevant stderr errors that are captured through TAR or other means. BACKUPMON will also insert its own errors here as well to paint a complete picture of the events. Here's a small sampling of stuff that was failing when I was testing out getting it to fail so it would write these errors...