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!

Has anyone had the script successfully mount a share on a Synology NAS?

Yes, mine does with no problems, I created an account on the NAS just for the router to use.

Code:
USERNAME="alan"
PASSWORD="???????????????"
UNC="\\\\192.168.1.22\\public"
EXTDRIVE="/tmp/mnt/ALANS-NAS/public"

mount -t cifs $UNC $EXTDRIVE -o "vers=2.1,username=${USERNAME},password=${PASSWORD}"
 
Yes, mine does with no problems, I created an account on the NAS just for the router to use.

Code:
USERNAME="alan"
PASSWORD="???????????????"
UNC="\\\\192.168.1.22\\public"
EXTDRIVE="/tmp/mnt/ALANS-NAS/public"

mount -t cifs $UNC $EXTDRIVE -o "vers=2.1,username=${USERNAME},password=${PASSWORD}"
Thanks for the confirmation. I figured out that script did not like "$" as first character of password. OOPS! 😒
 
Don't get used to 2 updates per day... but I thought these were relatively important ones to get published asap! :)

What's new!
v1.12 - (September 16, 2023)
- FIXED:
You guys are getting a BOGO today. Thanks to @ColinTaylor for the recommendation to immediately force a reboot after restoring the NVRAM.cfg file, instead of prompting the user to choose y/n. I agree... this should be done immediately after, just like when restoring NVRAM from the UI.
- ADDED: Good suggestion from @maghuro to check to make sure the source/target routers are the same, so that people aren't trying to restore an RT-AC86U backup onto a GT-AX6000, thinking this is all fine and all. Added some logic in there that captures router model and saves it to your config, and will compare that to the router model when you start a restore. This is the best attempt I can come up with to prevent people from bricking their router, and a last stop-gap measure to prevent a restore from doing potential damage. Please make sure you save a fresh copy of your configs as this value will need to be written before a restore can happen.

Download link (or update directly within BACKUPMON):

Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.12.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
 
Just a nit, but have you considered not having delay in launching manual backup when invoked via "backupmon -backup" command?
 
Just a nit, but have you considered not having delay in launching manual backup when invoked via "backupmon -backup" command?
It's there if people want to hit (S)etup or (X) Restore if the backup kicks off... I would think that typically people wouldn't even be seeing this screen 99% of the time if it's running from CRON. ;)

I can add a key, like (C)ancel timer or (R)un now? Or are you talking about bypassing it altogether if you call it with the -backup switch?
 
It's there if people want to hit (S)etup or (X) Restore if the backup kicks off... I would think that typically people wouldn't even be seeing this screen 99% of the time if it's running from CRON. ;)

I can add a key, like (C)ancel timer or (R)un now? Or are you talking about bypassing it altogether if you call it with the -backup switch?
Yes, bypass altogether when using specific switch. I kept seeing it when I was trying to figure out why Synology NAS share wouldn't mount...
 
Latest stable BACKUPMON script running smoothly....thanks again @Viktor Jaep for helping me get this setup correctly with my environment!!! I really appreciate it.
 
Yes, bypass altogether when using specific switch. I kept seeing it when I was trying to figure out why Synology NAS share wouldn't mount...
This has been completed... will be in the next release. ;)
 
Latest stable BACKUPMON script running smoothly....thanks again @Viktor Jaep for helping me get this setup correctly with my environment!!! I really appreciate it.
Sleep better at night knowing your environment is being safely backed up! :)
 
OK... this "should" be the final update for a little while... :) let the suggestions keep coming though! This thing has really evolved! LOL

What's new?
v1.14 - (September 17, 2023)
- MAJOR:
Added an auto-purge feature! Based on the existing purge feature from the operations section under the setup menu, when calling "sh backupmon.sh -purge", it will use the purge settings you have configured to trim your perpetual backups without any user input. You can utilize this switch in conjunction with a daily CRON job to keep your backups trimmed.
- ADDED: Thanks to @visortgw, added functionality to bypass the 10 second initial timer when using the -backup switch. If BACKUPMON is called without switches, it will use the 10 second timer.
- MINOR: General improvements to visual spacing, messaging and logging.

Download link (or update directly within BACKUPMON):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.14.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
 
Last edited:
OK... this "should" be the final update for a little while... :) let the suggestions keep coming though! This thing has really evolved! LOL

What's new?
v1.14 - (September 17, 2023)
- MAJOR:
Added an auto-purge feature! Based on the existing purge feature from the operations section under the setup menu, when calling "sh backupmon.sh -purge", it will use the purge settings you have configured to trim your perpetual backups without any user input. You can utilize this switch in conjunction with a daily CRON job to keep your backups trimmed.
- ADDED: Thanks to @visortgw, added functionality to bypass the 10 second initial timer when using the -backup switch. If BACKUPMON is called without switches, it will use the 10 second timer.
- MINOR: General improvements to visual spacing, messaging and logging.

Download link (or update directly within BACKUPMON):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.14.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
This update appears to break initial setup after new installation:
Code:
toor@nwind-B540:/jffs/scripts# sh /jffs/scripts/backupmon.sh -setup

 ERROR: BACKUPMON is not configured.  Please run 'backupmon.sh -setup' first.

toor@nwind-B540:/jffs/scripts#
 
This update appears to break initial setup after new installation:
Code:
toor@nwind-B540:/jffs/scripts# sh /jffs/scripts/backupmon.sh -setup

 ERROR: BACKUPMON is not configured.  Please run 'backupmon.sh -setup' first.

toor@nwind-B540:/jffs/scripts#
Great catch, @visortgw ... Fixed!

What's new!?
v1.15 - (September 17, 2023)
- FIXED:
Minor bug fix preventing a new install from getting into setup! So much for optimizations! :) Thanks much to @visortgw for the catch!

Download link (or update directly within BACKUPMON):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.15.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
 
@Viktor Jaep if I run:-

Bash:
backupmon -purge

I get:-

Code:
ERROR: Perpetual backups are not configured. Please check your configuration. Exiting.

But of course they are:-

Code:
----------------------------------------------------------------
Configuration Utility Options
----------------------------------------------------------------
   : Source Router Model         :RT-AX86U
 1 : Backup Target Username      :(hidden)
 2 : Backup Target Password      :(hidden)
 3 : Backup Target UNC Path      :\\\\xxx.xxx.x.xxx\\NetBackup
 4 : Local Drive Mount Path      :/tmp/mnt/backups
 5 : Backup Target Dir Path      :/(hidden)
 6 : Backup Exclusion File Name  :/jffs/addons/backupmon.d/exclusions
 7 : Schedule Backups?           :Yes
 |--  Time:                      :4:30
 8 : Backup Frequency?           :Perpetual
 |--  Purge Backups?             :Yes
 |--  Purge older than (days):   :90
 9 : Backup/Restore Mode         :Basic
 |
 s : Save & Exit
 e : Exit & Discard Changes
----------------------------------------------------------------

A manual run of "pg" from the menu seems to be OK though ...
 
@Viktor Jaep any chance that we could have the cron job that you install (optionally) do a backup then an auto-purge all in one go please if Purge config is "yes"?
 
@Viktor Jaep if I run:-

Bash:
backupmon -purge

I get:-

Code:
ERROR: Perpetual backups are not configured. Please check your configuration. Exiting.

But of course they are:-

Code:
----------------------------------------------------------------
Configuration Utility Options
----------------------------------------------------------------
   : Source Router Model         :RT-AX86U
 1 : Backup Target Username      :(hidden)
 2 : Backup Target Password      :(hidden)
 3 : Backup Target UNC Path      :\\\\xxx.xxx.x.xxx\\NetBackup
 4 : Local Drive Mount Path      :/tmp/mnt/backups
 5 : Backup Target Dir Path      :/(hidden)
 6 : Backup Exclusion File Name  :/jffs/addons/backupmon.d/exclusions
 7 : Schedule Backups?           :Yes
 |--  Time:                      :4:30
 8 : Backup Frequency?           :Perpetual
 |--  Purge Backups?             :Yes
 |--  Purge older than (days):   :90
 9 : Backup/Restore Mode         :Basic
 |
 s : Save & Exit
 e : Exit & Discard Changes
----------------------------------------------------------------

A manual run of "pg" from the menu seems to be OK though ...
Of course! Argh! I will check this out and see if I can replicate this. I tested the purge switch without any issues before... will see what's up! ;)
 
Of course! Argh! I will check this out and see if I can replicate this. I tested the purge switch without any issues before... will see what's up! ;)
nice!

1695026486471.png
 
Thanks for finding all these nuances... :) Another bug fix is available:

What's new?
v1.16 - (September 18, 2023)
- FIXED:
Another minor bug fix that was preventing the -purge switch from working correctly. Many thanks to @Stephen Harrington for identifying that!
- ADDED: By request, if you have enabled "Purge Backups" in the configuration menu, then auto purge will automatically run if you call BACKUPMON with the -backup switch, ie: "sh backupmon.sh -backup". After it completes a backup, it will auto purge any backups that fall in range with the set number of days value. You can still run BACKUPMON without auto purging, even if "Purge Backups" is enabled, by just running BACKUPMON without switches, ie: "sh backupmon.sh". Thanks to @Stephen Harrington for the good idea!

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

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