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!

Decided that the cron job deserved its own spot on the config menu this morning for easy reference... this has now been added to the backupmon.cfg for tracking, so make sure you run through option 11 one more time to indicate your cron scheduler choice, and save your config. :)

Please refresh your copy of Beta5 to get this option... I think this is probably the last thing before making this official!

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

1699623851993.png
 
Last edited:
Getting an early start to the much anticipated weekend release... Sorry for the huge extended changelog below... it's a freaking novel. BACKUPMON has come a long way since its initial release only 2 months ago! ENJOY! :)

Really, thanks to this community... @visortgw, @Quoc Huynh, @Martinski, @Jeffrey Young, @Kingp1n, @Ripshod, @SomeWhereOverTheRainBow, @PeterT ... and everyone else involved in testing, reporting bugs, and suggesting features... you all are awesome. Thanks so much for your support in helping make BACKUPMON a reliable backup solution for our routers! :) You have gone above and beyond to help expand its functionality, and is now capable of these various scenarios:

Router USB Drive -> External Network Device/Share (on your local network)
Router USB Drive -> Local Router Network Share (could be mounted to a secondary partition on your USB Drive, or secondary USB Drive)
Router USB Drive -> Secondary Router USB Drive (plugged into the secondary USB port)
Router USB Drive -> Router USB Drive (backing up to itself into a separate folder... of course, not recommended, but possible)
Router USB Drive Partition 1 -> Router USB Drive Partition 2 (kinda like the one above, but gives it a little more separation)

On with the changelog... :)

What's new?!
v1.35 - (November 10, 2023)
- ADDED:
Created a secondary commandline switch (-bw) that will launch the script in single color B/W. Thanks to some creative suggestions from @PeterT and an extreme dislike of any form of color within scripts from @ColinTaylor, which helped give me a push in this direction. Instructions: The -bw switch much be used secondarily to any other switch... such as "backupmon.sh -backup -bw", or when using "backupmon.sh -setup -bw". Using a switch like this would allow you to then dump screenwrites to a log file without all the messy color escape characters, and make it much more readable. It's not perfect, but in lieu of creating a separate log file (on to-do list), this will make do.
- ADDED: For the capability to distinguish between directly attached USB backup devices, and network backup devices using a new menu item, available in the config menu. (See item #2). You will also need to indicate whether your backup target is a "Network" or "USB" device. In the case of a USB Backup Target (directly attached to your router), the script will no longer mount or unmount the device before or after a backup has been completed. It will also use the mount point selector to let you chose an already mounted USB device. By default, "Network" is selected, which in this case requires you to fill in a mount point name of your choice that the script will create for you. Thanks much to @Quoc Huynh for the helpful suggestion, and for the extensive testing done by @visortgw!
- ADDED: New functionality to the scheduler menu item, asking if you want the script to simply run a backup, or if you want it to run a backup + autopurge. If you chose the latter, it will add the "-backup" switch to the cron job. Please note: when running "backupmon.sh" standalone, you will only run a backup job. If you run "backupmon.sh -backup", it will run a backup followed by an autopurge for those who are running in "perptual backup frequency" mode. This is just an automated way to keep your backups trimmed per the age that you have specified. This item is now also featured under the config menu (under item #11) for easy reference. Please make sure you save your config!
- FIXED: The order of the config menu items for the primary, secondary and test backup menu items have been optimized. It now starts with determining what type of media the target device is, and using this info, will determine if menu items need to get grayed out. In the case of selecting the USB option, it will also now force the use of @Martinski's excellent mount point selector!
- FIXED: Many verbiage changes in the config menu to help standardize terms.
- FIXED: @Martinski has worked some magic on his mount point selector functions to catch unexpected characters in your drive labels. PRO TIP: Please try to keep your drive labels as plain as possible. Ex: SAMSUNG-SSD
- FIXED: The annoying bug that @visortgw identified when choosing USB, the script would still complain if one of the passwords was plaintext, eventhough it would not even get used in this scenario. When USB is selected as a target backup device, checking for plaintext passwords will no longer come under scrutiny.

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

Significant Screenshots:

Slightly new look, new feel...
1699678483224.png


1699678495496.png


Lots of behind-the-scenes functionality improvements... Reordered config menu, including expanding out what the scheduled CRON job will be doing:
1699678458381.png


YIKES! MONOCHROME MADNESS! :p (command used: backupmon -setup -bw )
1699679481643.png
 
Last edited:
but in lieu of creating a separate log file (on to-do list), this will make do.
That is one thing I was going to ask about.
If I run a backup before a major change I don't sit there and watch. I leave and make myself a coffee or do whatever, but by the time I get back we're back to the menu.
A log will definitely be welcomed by me.
 
That is one thing I was going to ask about.
If I run a backup before a major change I don't sit there and watch. I leave and make myself a coffee or do whatever, but by the time I get back we're back to the menu.
A log will definitely be welcomed by me.
Are you wanting it to be just terminally logged, syslogged, or logged to a file? Can you be specific on what you are expecting to see during each operation? Something like - * Warning: Your important stuff's now being absorbed into the maelstrom! - okay?
 
Terminal logging would not work for automated backups right?
Syslogging would be ideal for my external syslog server, but failing that logging to a file would work.
 
Terminal logging would not work for automated backups right?
Syslogging would be ideal for my external syslog server, but failing that logging to a file would work.
Actually currently, since day 1, essential items can be found in the syslog.
 
So it does. I never spotted it because I have set it up as a perpetual weekly BACKUP with purge (Sunday AM). I just ran a manual and low and behold it's there.
 
So it does. I never spotted it because I have set it up as a perpetual weekly BACKUP with purge (Sunday AM).
So my thought was including more detail in its own separate log file that you could view from the menu. At least that was the direction I was going so I don't spam the syslog.
 
So my thought was including more detail in its own separate log file that you could view from the menu. At least that was the direction I was going so I don't spam the syslog.
Then that's the way to go I think.
 
Heaven knows you guys have already done a great deal of work getting this to where it is now, but I have a feature request.
I mentioned earlier in this thread about how my backups were expanding and I've found the culprit - uiDivStats stores a rapidly expanding database file. Could there be a feature by which we could select to omit certain files or, like the original scripts, would parse a text filelist (with full directory/filenames or possibly even wildcards eg *.db)?
 
Last edited:
Heaven knows you guys have already done a great deal of work getting this to where it is now, but I have a feature request.
I mentioned earlier in this thread about how my backups were expanding and I've found the culprit - uiDivStats stores a rapidly expanding database file. Could there be a feature by which we could select to omit certain files or, like the original scripts, would parse a text filelist (with full directory/filenames or possibly even wildcards eg *.db)?
Already one step ahead of you there, @Ripshod! :p

This is where the exclusions file comes into play, in order to exclude certain types of files/folders... this would be a perfect candidate for it. You need to create it, and reference the filename/path in the config... Here's more info in this particular post:


I would love to see what others are adding to their exclusion files, because I'm sure there's probably logs all over that could be excluded.
 
D'oh! How did I not see that?
 
Sorry peeps, but there's a problem with the exclusions list.

It works fine for the primary backup but seems to be ignored for the secondary.

I first noticed the difference in the size of the backups so I've downloaded both backups and the files I omitted are still there in the secondary after extraction.
 
Sorry peeps, but there's a problem with the exclusions list.

It works fine for the primary backup but seems to be ignored for the secondary.

I first noticed the difference in the size of the backups so I've downloaded both backups and the files I omitted are still there in the secondary after extraction.
Taking a peek at the secondary exclusions list... standby.
 
Sorry peeps, but there's a problem with the exclusions list.

It works fine for the primary backup but seems to be ignored for the secondary.

I first noticed the difference in the size of the backups so I've downloaded both backups and the files I omitted are still there in the secondary after extraction.
Were you using a weekly backup? If so, I found an instance where the secondary backups were referring to the primary exclusion list... I made an interim fix here:

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

Also... perhaps you could post the contents of your primary and secondary exclusion lists incase there's something wonky there?
 
Last edited:
It's a strange one for sure.
I'm running a custom setup - daily Perpetual settings in the menu (sc) then cutomized services-start and cron job to just run Sunday AM.
Thanks for the modification, it's all working fine again :D

Edit: Primary and secondary backups use the same exclusion list.
 
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. 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:
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:

1699735995221.png


1699736051116.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
Might you consider adding a "Purge logs" option ("pl")? The log could grow to be rather large over time.
 

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