What's new

BACKUPMON BACKUPMON v1.5.10 -Mar 1, 2024- Backup/Restore your Router: JFFS + NVRAM + External USB Drive! (**Thread closed due to age**)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I've got my fingers crossed here but wouldn't this log contain the purge info anyway?

Edit: Misunderstood @visortgw's request.
 
Last edited:
Might you consider adding a "Purge logs" option ("pl")? The log could grow to be rather large over time.
It will auto purge and keep log size at 5000 rows for now. Should be plentiful, and won't take up much space.
 
I've got my fingers crossed here but wouldn't this log contain the purge info anyway?
Yep, it will contain all folders backups that have been purged as well.

Here's an example:
1699756578353.png
 
Last edited:
Looking at turning this around relatively quickly... added some logging capabilities!

What's new?
v1.36b2 - (TBA)
- ADDED:
By popular demand, BACKUPMON now features a dedicated log file, located under /jffs/addons/backupmon.d/backupmon.log. You can access this log by hitting "vl" from the setup and operations menu, and will use the NANO text editor to open the log. Exit NANO using CTRL-X. All major events that you would see on-screen are displayed in the log. Certain major items continue to be displayed in the main SYSLOG just incase people are utilizing these someway. I will continue pruning, adding and correcting items as needed.
- FIXED: Thanks to @Ripshod, found an invalid reference where the secondary backups were referring to the primary exclusion list file for weekly backups. Corrected the issue.

Download link:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.36b2.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"

Significant Screenshots:

View attachment 54135

View attachment 54136
This looks nice! Great work @Viktor Jaep
 
Quick question. Does the backup purge work off the directory name or the date it was created? I have a "baseline" backup I'd like to keep, so can I rename it or do I have to move it?
 
Quick question. Does the backup purge work off the directory name or the date it was created? I have a "baseline" backup I'd like to keep, so can I rename it or do I have to move it?
Goes by directory creation date... so yeah, you definitely want to move any baselines out of that area! :)
 
Quick back-to-back release adding a major feature -- a dedicated logfile that basically redirects events generated on-screen into this file. Please note, major items continue to be logged to the SYSLOG if anyone finds that useful. If not, let me know, and I'll turn this off... the less clutter, the better, right? :) Thanks to @SomeWhereOverTheRainBow for his advice on log content, and whether or not to integrate this into Scribe as well... that's still on the consideration list, depending on how overwhelming demand would be for this. At this point, the logfile will reach a max size of 5000 rows before it starts trimming itself to stay in that range. With normal daily backup use, that would give you almost a year's worth of logs if you're doing primary backups only. Adding secondary backups to this would cut it in half, and give you about 6 months worth of logs.

What's new?
v1.37 - (November 12, 2023)
- ADDED:
By popular demand, BACKUPMON now features a dedicated log file, located under /jffs/addons/backupmon.d/backupmon.log. You can access this log by hitting "vl" from the setup and operations menu, and will use the NANO text editor to open the log. Exit NANO using CTRL-X. All major events that you would see on-screen are displayed in the log. Certain major items continue to be displayed in the main SYSLOG just incase people are utilizing these someway. I will continue pruning, adding and correcting items as needed. The logfile won't exceed 5000 lines, and will keep itself trimmed automatically, so there won't be any space concerns in /jffs.
- FIXED: Thanks to @Ripshod, found an invalid reference where the secondary backups were referring to the primary exclusion list file for weekly backups. Corrected the issue.

Download link (or update directly within AMTM):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.37.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"

Significant Screenshots:

New menu item, use "vl" to view logs using NANO text editor. Use CTRL-X to exit from editor
1699801702252.png


Example of the log contents... (1) It will show every single backup directory it purges for those of you using "Perpetual Backups" so you have record of this, and (2) you can mostly expect to see INFO (informational) events, however, if things escalate, you will see WARNING, and ultimately **ERROR** events when things go really bad. I used a bad network path here to make an example.
1699801926479.png
 
Last edited:
I'm confused about the option to set the exclusion list. Selecting option 8 says the default is /jffs/addons/backupmon.d/exclusions.txt. I'd never specified a value so assumed that the default would be used, which is not the case.
 
I'm confused about the option to set the exclusion list. Selecting option 8 says the default is /jffs/addons/backupmon.d/exclusions.txt. I'd never specified a value so assumed that the default would be used, which is not the case.
Sorry... The default is actually nothing... blank. It should have said "Example: /jffs/addons/backupmon.d/exclusions.txt" -- If you want to use an exclusion file, you must create the file and can put it anywhere, as long as your path referencing it is correct. The contents of the file should just be a list of files/folders that you want to exclude from the backup.

Example contents of "exclusions.txt":
Code:
myswap.swp
entware/var/log/*
skynet/skynet.log
 
Sorry... had to push another minor update to address the way that the FW/Build version information is captured through nvram...

What's new?
v1.38 - (November 13, 2023)
- FIXED:
On the heels of RMerlin's 386.12_2 release, I realized that the FW build values I was pulling did not include the minor version "_2", and continued to pull just "386.12" when querying this information (that's what you get for assuming). RMerlin explained that the minor version is captured under the EXTENDNO variable under nvram. Made a slight tweak to the way this is now being captured and documented, as it's used when comparing what was backed up vs. what is being restored, and issuing the proper warning should these values not match, and hopefully prevent someone from restoring a FW CFG from an older version onto a newer version, and possibly borking up their router.

Download link (or update directly within AMTM):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.38.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
 
Last edited:
I have 2 partitions on my SSD, however, Is there a way to mount my 2nd NTFS partition? This is the error I'm getting:

Code:
Backup Target Network Connection Tester
----------------------------------------------------------------
 1  : Test Target Media Type              : Network
 2  : Test Target Username                : Admin
 3  : Test Target Password                : Admin
 4  : Test Target UNC Path                : \\\\192.168.1.1\\Backups
 5  : Test Target Backup Mount Point      : /tmp/mnt/SamsungSSD/Backups
 6  : Test Target Dir Path                : /router/test-backup
 | 
 t  : Test your Network Backup Connection
 p  : Import your Primary Backup Settings
 s  : Import your Secondary Backup Settings
 e  : Exit Back to Setup + Operations Menu
----------------------------------------------------------------

Selection: t

Messages:
INFO: Backup Target (192.168.1.1) reachable via PING.
INFO: External test drive mount point exists. Found under: /tmp/mnt/SamsungSSD/Backups
mount: mounting \\192.168.1.1\Backups on /tmp/mnt/SamsungSSD/Backups failed: Invalid argument
WARNING: Unable to mount to external network drive. Retrying...
mount: mounting \\192.168.1.1\Backups on /tmp/mnt/SamsungSSD/Backups failed: Invalid argument
WARNING: Unable to mount to external network drive. Retrying...
ERROR: Unable to mount to external network drive (/tmp/mnt/SamsungSSD/Backups). Please check your configuration. Exiting.
Press any key to acknowledge...
ERROR: Failed to run Network Backup Test Script -- Drive mount failed. Please check your configuration!
Press any key to acknowledge...
 
I have 2 partitions on my SSD, however, Is there a way to mount my 2nd NTFS partition? This is the error I'm getting:

Code:
Backup Target Network Connection Tester
----------------------------------------------------------------
 1  : Test Target Media Type              : Network
 2  : Test Target Username                : Admin
 3  : Test Target Password                : Admin
 4  : Test Target UNC Path                : \\\\192.168.1.1\\Backups
 5  : Test Target Backup Mount Point      : /tmp/mnt/SamsungSSD/Backups
 6  : Test Target Dir Path                : /router/test-backup
 |
 t  : Test your Network Backup Connection
 p  : Import your Primary Backup Settings
 s  : Import your Secondary Backup Settings
 e  : Exit Back to Setup + Operations Menu
----------------------------------------------------------------

Selection: t

Messages:
INFO: Backup Target (192.168.1.1) reachable via PING.
INFO: External test drive mount point exists. Found under: /tmp/mnt/SamsungSSD/Backups
mount: mounting \\192.168.1.1\Backups on /tmp/mnt/SamsungSSD/Backups failed: Invalid argument
WARNING: Unable to mount to external network drive. Retrying...
mount: mounting \\192.168.1.1\Backups on /tmp/mnt/SamsungSSD/Backups failed: Invalid argument
WARNING: Unable to mount to external network drive. Retrying...
ERROR: Unable to mount to external network drive (/tmp/mnt/SamsungSSD/Backups). Please check your configuration. Exiting.
Press any key to acknowledge...
ERROR: Failed to run Network Backup Test Script -- Drive mount failed. Please check your configuration!
Press any key to acknowledge...
Try picking the USB method (instead of Network)... and selecting the target mount point path. :)
 
Try picking the USB method (instead of Network)... and selecting the target mount point path. :)
I appreciate the quick response, switched to USB and this is the new error I'm getting now:

Code:
BACKUPMON v1.38

Normal Backup starting in 10 seconds. Press [S]etup or [X] to override and enter RESTORE mode

Asus Router Model: GT-AX11000
Firmware/Build Number: 3004.388.4_0
External USB Drive Mount Path: /tmp/mnt/SamsungSSD
Backing up to USB mounted to /tmp/mnt/SamsungSSD/Backups/Backup directory location: /router/GT-AX11000-Backups
Frequency: Monthly
Mode: Basic

[Primary Backup Commencing]...  

Messages:
STATUS: External drive (USB) skipping mounting process.
ERROR: Failed to run Backup Script -- Drive mount failed. Please check your configuration!

Update: I removed the "Backups" folder inside the "SamsungSSD" and now it's mounting: tmp/mnt/SamsungSSD/"Backups" to read: /tmp/mnt/SamsungSSD

Code:
Selection: t

Messages:
INFO: Backup Target (192.168.1.1) reachable via PING.
INFO: External test drive mount point exists. Found under: /tmp/mnt/SamsungSSD
Press any key to acknowledge...
STATUS: External test drive (\\192.168.1.1\Backups) mounted successfully under: /tmp/mnt/SamsungSSD
STATUS: Test Backup Directory successfully created under: /router/test-backup
STATUS: Daily Test Backup Subdirectory successfully created under: /router/test-backup/test
/jffs/scripts/backupmon.sh: line 30: can't create /tmp/mnt/SamsungSSD/router/test-backup/Test/testfile.txt: nonexistent directory
STATUS: Finished copying testfile.txt to /tmp/mnt/SamsungSSD/router/test-backup/test
STATUS: Settling for 10 seconds...
STATUS: External test tetwork drive (\\192.168.1.1\Backups) unmounted successfully.
Press any key to acknowledge...

But now it's failing to mount again, I will try rebooting router.
 
Last edited:
I appreciate the quick response, switched to USB and this is the new error I'm getting now:

Code:
BACKUPMON v1.38

Normal Backup starting in 10 seconds. Press [S]etup or [X] to override and enter RESTORE mode

Asus Router Model: GT-AX11000
Firmware/Build Number: 3004.388.4_0
External USB Drive Mount Path: /tmp/mnt/SamsungSSD
Backing up to USB mounted to /tmp/mnt/SamsungSSD/Backups/Backup directory location: /router/GT-AX11000-Backups
Frequency: Monthly
Mode: Basic

[Primary Backup Commencing]...

Messages:
STATUS: External drive (USB) skipping mounting process.
ERROR: Failed to run Backup Script -- Drive mount failed. Please check your configuration!

Update: I removed the "Backups" folder inside the "SamsungSSD" and now it's mounting: tmp/mnt/SamsungSSD/"Backups" to read: /tmp/mnt/SamsungSSD

Code:
Selection: t

Messages:
INFO: Backup Target (192.168.1.1) reachable via PING.
INFO: External test drive mount point exists. Found under: /tmp/mnt/SamsungSSD
Press any key to acknowledge...
STATUS: External test drive (\\192.168.1.1\Backups) mounted successfully under: /tmp/mnt/SamsungSSD
STATUS: Test Backup Directory successfully created under: /router/test-backup
STATUS: Daily Test Backup Subdirectory successfully created under: /router/test-backup/test
/jffs/scripts/backupmon.sh: line 30: can't create /tmp/mnt/SamsungSSD/router/test-backup/Test/testfile.txt: nonexistent directory
STATUS: Finished copying testfile.txt to /tmp/mnt/SamsungSSD/router/test-backup/test
STATUS: Settling for 10 seconds...
STATUS: External test tetwork drive (\\192.168.1.1\Backups) unmounted successfully.
Press any key to acknowledge...

But now it's failing to mount again, I will try rebooting router.
Doesn't sound like your picking the right mount point? Is this right? Is the mount point picker allowing you to select this? Also, it looks like according to the logs above, it's using the network method again?

/tmp/mnt/SamsungSSD/Backups/

PS. Please post a screenshot of what mount points you see with the mount point selector?
 
Last edited:
Doesn't sound like your picking the right mount point? Is this right? Is the mount point picker allowing you to select this? Also, it looks like according to the logs above, it's using the network method again?

/tmp/mnt/SamsungSSD/Backups/

PS. Please post a screenshot of what mount points you see with the mount point selector?
These are my 2 partitions below & the drive-mount point it's automatically choosing sda1 when selecting USB. I will uninstall script, reboot router and start from scratch! Thanks for helping out!

Code:
@GT-AX11000-XXXX:/tmp/home/root# blkid
/dev/sda2: LABEL="SamsungSSD" UUID="1208C4EC3A509DCF"
/dev/sda1: LABEL="Diversion" UUID="560672ad-c776-4ef4-905c-2823bc292c46"

Code:
 Source Router Model                : GT-AX11000
    : Source Router Firmware/Build       : 3004.388.4_0
 1  : Source EXT USB Drive Mount Point   : /tmp/mnt/Diversion
 2  : Backup Target Media Type           : USB
 3  : Backup Target Username             : admin
 4  : Backup Target Password (ENC)       : YWRtaW4K
 5  : Backup Target UNC Path             : \\\\192.168.50.25\\Backups
 6  : Backup Target Mount Point          : /tmp/mnt/SamsungSSD
 7  : Backup Target Directory Path       : /router/GT-AX11000-Backups
 8  : Backup Exclusion File Name         :
 9  : Backup Frequency?                  : Monthly
 |---  Purge Backups?                    : No
 |  -  Purge older than (days):          : N/A
 10 : Backup/Restore Mode                : Basic
 11 : Schedule Backups?                  : No
 |  -  Time:                             : 2:30
 |---  Scheduled Backup Mode             : Backup Only
 12 : Secondary Backup Config Options    : Disabled

Code:
Selection: 1

1. Please choose the SOURCE Mount Point of your attached external USB Drive that
contains data that you want to have backed up. In most cases, whatever is
attached to your sda1 partition should be selected. Should there be only one
mount point available, it will be automatically selected.
(Recommended drive on sda1 = /tmp/mnt/Diversion)

Mount Point Selected:
/tmp/mnt/Diversion

Press any key to acknowledge...
 
Last edited:
These are my 2 partitions below & the drive-mount point it's automatically choosing sda1 when selecting USB. I will uninstall script, reboot router and start from scratch! Thanks for helping out!

Code:
@GT-AX11000-XXXX:/tmp/home/root# blkid
/dev/sda2: LABEL="SamsungSSD" UUID="1208C4EC3A509DCF"
/dev/sda1: LABEL="Diversion" UUID="560672ad-c776-4ef4-905c-2823bc292c46"

Code:
 Source Router Model                : GT-AX11000
    : Source Router Firmware/Build       : 3004.388.4_0
 1  : Source EXT USB Drive Mount Point   : /tmp/mnt/Diversion
 2  : Backup Target Media Type           : USB
 3  : Backup Target Username             : admin
 4  : Backup Target Password (ENC)       : YWRtaW4K
 5  : Backup Target UNC Path             : \\\\192.168.50.25\\Backups
 6  : Backup Target Mount Point          : /tmp/mnt/SamsungSSD
 7  : Backup Target Directory Path       : /router/GT-AX11000-Backups
 8  : Backup Exclusion File Name         :
 9  : Backup Frequency?                  : Monthly
 |---  Purge Backups?                    : No
 |  -  Purge older than (days):          : N/A
 10 : Backup/Restore Mode                : Basic
 11 : Schedule Backups?                  : No
 |  -  Time:                             : 2:30
 |---  Scheduled Backup Mode             : Backup Only
 12 : Secondary Backup Config Options    : Disabled

Code:
Selection: 1

1. Please choose the SOURCE Mount Point of your attached external USB Drive that
contains data that you want to have backed up. In most cases, whatever is
attached to your sda1 partition should be selected. Should there be only one
mount point available, it will be automatically selected.
(Recommended drive on sda1 = /tmp/mnt/Diversion)

Mount Point Selected:
/tmp/mnt/Diversion

Press any key to acknowledge...
So just to clarify... when you go through option #1, you aren't presented with both of your partitions? It just auto-selects "/tmp/mnt/Diversion", and doesn't give you a choice? It looks like both your mount point paths are correct in your screenshot above... when you run the backup, are you still getting errors, eventhough they're pointing to /tmp/mnt/Diversion and /tmp/mnt/SamsungSSD?

EDIT... Sorry @Kingp1n... I guess you stated that above... @Martinski... any idea why this might be happening?
 
So just to clarify... when you go through option #1, you aren't presented with both of your partitions? It just auto-selects "/tmp/mnt/Diversion", and doesn't give you a choice? It looks like both your mount point paths are correct in your screenshot above... when you run the backup, are you still getting errors, eventhough they're pointing to /tmp/mnt/Diversion and /tmp/mnt/SamsungSSD?

EDIT... Sorry @Kingp1n... I guess you stated that above... @Martinski... any idea why this might be happening?
Just to clarfiy....On my initial setup it did presented me with both partitions during option 1 and I thought I had setup everything correctly with the exception of choosing Network vs USB. I did try to uninstall and reinstall the script without rebooting router and this is when the script was automatically choosing sda1.

However I will uninstall completely, reboot router and try again from scratch choosing USB to see if it makes a difference. Thanks for the input.
 
Just to clarfiy....On my initial setup it did presented me with both partitions during option 1 and I thought I had setup everything correctly with the exception of choosing Network vs USB. I did try to uninstall and reinstall the script without rebooting router and this is when the script was automatically choosing sda1.

However I will uninstall completely, reboot router and try again from scratch choosing USB to see if it makes a difference. Thanks for the input.
You really shouldn't have to reboot... the mount point selector should always show you all the available partitions to choose from... that's what's confusing here. :( If it was only selecting sda1, then the router wasn't recognizing sda2... which is weird. Maybe it has to take some time for it to recognize? No idea. ;(
 
You really shouldn't have to reboot... the mount point selector should always show you all the available partitions to choose from... that's what's confusing here. :( If it was only selecting sda1, then the router wasn't recognizing sda2... which is weird. Maybe it has to take some time for it to recognize? No idea. ;(
Keep in mind, partitions could be buggy as well. It couldn't hurt to ensure the partition is in good health.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top