Skip to content

Commit

Permalink
Merge pull request #37 from ViktorJp/develop
Browse files Browse the repository at this point in the history
Publish BACKUPMON v1.8.5
  • Loading branch information
ViktorJp authored Jun 21, 2024
2 parents 6685fb1 + ce63c5d commit 52166e5
Show file tree
Hide file tree
Showing 8 changed files with 5,937 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# BACKUPMON v1.8.4
# BACKUPMON v1.8.5
![image](https://github.com/ViktorJp/BACKUPMON/assets/97465574/653e9ce8-bf0a-4faf-a8f9-e60aa367328e)

**First off** -- HUGE thanks to @Jeffrey Young for sharing his original backup script. His script is the main engine of BACKUPMON, and all credit goes to him! BACKUPMON is simply a wrapper around Jeff's backup script functionality, adding easy-to-use menus, more status feedback, and the ability to launch a restore based on your previous backups. Also, big thanks to @Martinski for his many contributions as well as his extremely helpful AMTM email library script, and huge props to @visortgw for contributing to the backup methodologies thread with his scripts and wisdom!
Expand Down
File renamed without changes.
File renamed without changes.
5,915 changes: 5,915 additions & 0 deletions backupmon-1.8.4.sh

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions backupmon.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

# Original functional backup script by: @Jeffrey Young, August 9, 2023
# BACKUPMON v1.8.4 heavily modified and restore functionality added by @Viktor Jaep, 2023-2024
# BACKUPMON heavily modified and restore functionality added by @Viktor Jaep, 2023-2024
#
# BACKUPMON is a shell script that provides backup and restore capabilities for your Asus-Merlin firmware router's JFFS,
# NVRAM and external USB drive environment. By creating a network share off a NAS, server, or other device, BACKUPMON can
Expand All @@ -17,13 +17,13 @@
# Please use the 'backupmon.sh -setup' command to configure the necessary parameters that match your environment the best!

# Variable list -- please do not change any of these
Version="1.8.4" # Current version
Version="1.8.5" # Current version
Beta=0 # Beta release Y/N
CFGPATH="/jffs/addons/backupmon.d/backupmon.cfg" # Path to the backupmon config file
DLVERPATH="/jffs/addons/backupmon.d/version.txt" # Path to the backupmon version file
LOGFILE="/jffs/addons/backupmon.d/backupmon.log" # Path to the local logfile
ERRORLOGFILE="/jffs/addons/backupmon.d/backupmonerrors.log" # Path to the local errors logfile
ERRORFILE="/jffs/addons/backupmon.d/errors.txt" # Path to the local error flag file
ERRORFILE="/jffs/addons/backupmon.d/errors.txt" # Path to the local error flag file
PFEXCLUSION="/jffs/addons/backupmon.d/pfexclusion.txt" # Path to pagefile exclusion file
WDAY="$(date +%a)" # Current day # of the week
MDAY="$(date +%d)" # Current day # of the month
Expand Down Expand Up @@ -395,9 +395,15 @@ vconfig () {
echo -e "${InvGreen} ${CClear} ${InvDkGray}${CWhite} ${CClear} : BACKUPMON Version : ${CGreen}$Version"
echo -e "${InvGreen} ${CClear} ${InvDkGray}${CWhite} ${CClear} : Source Router Model : ${CGreen}$ROUTERMODEL"
echo -e "${InvGreen} ${CClear} ${InvDkGray}${CWhite} ${CClear} : Source Router Firmware/Build : ${CGreen}$FWBUILD"
echo -e "${InvGreen} ${CClear} ${InvDkGray}${CWhite}(1) ${CClear} : Source EXT USB Drive Mount Point : ${CGreen}$EXTDRIVE"

if [ "$EXTDRIVE" == "/tmp/mnt/<selectusbdrive>" ]; then
echo -e "${InvGreen} ${CClear} ${InvDkGray}${CWhite}(1) ${CClear} : Source EXT USB Drive Mount Point : ${CWhite}${InvRed}<-- Action Needed! ${CClear}"
else
echo -e "${InvGreen} ${CClear} ${InvDkGray}${CWhite}(1) ${CClear} : Source EXT USB Drive Mount Point : ${CGreen}$EXTDRIVE"
fi

echo -e "${InvGreen} ${CClear} ${InvDkGray}${CWhite}(2) ${CClear} : Backup Target Media Type : ${CGreen}$BACKUPMEDIA"

if [ "$BACKUPMEDIA" == "USB" ]; then
echo -e "${InvGreen} ${CClear} ${InvDkGray}${CWhite}(3) ${CClear}${CDkGray} : Backup Target Username : ${CDkGray}$BTUSERNAME"
echo -e "${InvGreen} ${CClear} ${InvDkGray}${CWhite}(4) ${CClear}${CDkGray} : Backup Target Password (ENC) : ${CDkGray}$BTPASSWORD"
Expand Down Expand Up @@ -1479,7 +1485,7 @@ vconfig () {
echo 'UNC="\\\\192.168.50.25\\Backups"'
echo 'NFSMOUNTOPT=""'
echo 'UNCDRIVE="/tmp/mnt/backups"'
echo 'EXTDRIVE="/tmp/mnt/usbdrive"'
echo 'EXTDRIVE="/tmp/mnt/<selectusbdrive>"'
echo 'EXTLABEL="usbdrive"'
echo 'BKDIR="/router/GT-AX6000-Backup"'
echo 'BACKUPMEDIA="Network"'
Expand Down
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
v1.8.5 - (June 21, 2024)
- MINOR: Added a tweak to the config menu that will now display a RED <-- Action Needed! arrow in
place of the "Source EXT USB Drive Mount Point" entry if the default sample mount point name is
still in use (ie. "/tmp/mnt/<selectusbdrive>"). Thanks to @Gen10 for running into this issue, and
figuring out that backup failures were happening because this mount point had not been changed yet.
The default entry written to the config file is now "/tmp/mnt/<selectusbdrive>".

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
Expand Down
3 changes: 2 additions & 1 deletion enhancements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Future Enhancements (Planned)
-----------------------------
* Create a log of errors (visortgw), and a notification if errors occurred on screen after backup runs (vibroverbus)

Completed:
----------
* change the default name of the /tmp/mnt/usbdrive so that it's easier to identify that it has not been changed. Perhaps red arrow?
* Create a log of errors (visortgw), and a notification if errors occurred on screen after backup runs (vibroverbus)
* Possibility of supporting NFS in addition to CIFS/SMB
* Edit exclusion file wth nano under setup menu
* logic to see if source and target are same with USB being active, seeing if exclusion for backup folder exists, if not give warning and option to add
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.4
1.8.5

0 comments on commit 52166e5

Please sign in to comment.