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!

Could you please download v1.32b2 again, and see if the messaging works better for you when backing up USB->USB?

Download:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.32b2.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
Perfect!!!
Code:
BACKUPMON v1.32b2

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

Asus Router Model: GT-AX6000
Firmware/Build Number: 3004.388.5
External USB Drive Mount Path: /tmp/mnt/TheS1RsUSB
Backing up to USB mounted to /tmp/mnt/bckupTheS1RBackup directory location: /TheS1RsGT-AX6000
Frequency: Monthly
Mode: Basic

[Primary Backup Commencing]...

Messages:
STATUS: External Drive (USB) mounted successfully as: /tmp/mnt/bckupTheS1R
STATUS: Finished backing up JFFS to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000/06/jffs.tar.gz.
STATUS: Finished backing up NVRAM to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000/06/nvram.cfg.
STATUS: Finished copying routerfw.txt to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000/06/routerfw.txt.
STATUS: Starting backup of EXT Drive on Mon Nov  6 14:57:35 EST 2023. Please stand by...
STATUS: Finished backing up EXT Drive in 18 sec to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000/06/TheS1RsUSB.tar.gz.
STATUS: Finished copying backupmon.sh script to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000.
STATUS: Finished copying backupmon.cfg script to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000.
STATUS: Finished copying exclusions script to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000.
STATUS: Finished copying reference nvram.txt extract to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000.
STATUS: Finished copying restoration instructions.txt to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000.
STATUS: Settling for 10 seconds...
STATUS: External USB drive continues to stay mounted.
 
Perfect!!!
Code:
BACKUPMON v1.32b2

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

Asus Router Model: GT-AX6000
Firmware/Build Number: 3004.388.5
External USB Drive Mount Path: /tmp/mnt/TheS1RsUSB
Backing up to USB mounted to /tmp/mnt/bckupTheS1RBackup directory location: /TheS1RsGT-AX6000
Frequency: Monthly
Mode: Basic

[Primary Backup Commencing]...

Messages:
STATUS: External Drive (USB) mounted successfully as: /tmp/mnt/bckupTheS1R
STATUS: Finished backing up JFFS to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000/06/jffs.tar.gz.
STATUS: Finished backing up NVRAM to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000/06/nvram.cfg.
STATUS: Finished copying routerfw.txt to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000/06/routerfw.txt.
STATUS: Starting backup of EXT Drive on Mon Nov  6 14:57:35 EST 2023. Please stand by...
STATUS: Finished backing up EXT Drive in 18 sec to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000/06/TheS1RsUSB.tar.gz.
STATUS: Finished copying backupmon.sh script to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000.
STATUS: Finished copying backupmon.cfg script to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000.
STATUS: Finished copying exclusions script to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000.
STATUS: Finished copying reference nvram.txt extract to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000.
STATUS: Finished copying restoration instructions.txt to /tmp/mnt/bckupTheS1R/TheS1RsGT-AX6000.
STATUS: Settling for 10 seconds...
STATUS: External USB drive continues to stay mounted.
Frankly I'm amazed USB->USB works even when the mount statement specifically wants to make a connection to a network share with a username/pwd. LOL
 
Frankly I'm amazed USB->USB works even when the mount statement specifically wants to make a connection to a network share with a username/pwd. LOL
Could it be that device is already mounted, essentially making the mount command unnecessary for USB destination drive?
 
Could it be that device is already mounted, essentially making the mount command unnecessary for USB destination drive?
Well, it's still calling it... but I guess ignoring everything else. I wonder what would happen if your network share (IP/sharename) is using bogus information... if it would still work. Completely experimental request to see what would break! :)
 
Frankly I'm amazed USB->USB works even when the mount statement specifically wants to make a connection to a network share with a username/pwd. LOL
The mount command is effectively ignored since the device is already mounted. I just tried:
  1. Changing username to something bogus; and
  2. Commenting out every mount command in the script and hardcoding return status to 0.
Both work! IMO, best solution would be not to attempt mount for USB destination device, period.
 
The mount command is effectively ignored since the device is already mounted. I just tried:
  1. Changing username to something bogus; and
  2. Commenting out every mount command in the script and hardcoding return status to 0.
Both work! IMO, best solution would be not to attempt mount for USB destination device, period.
Perhaps if the backup target media type = USB, then gray out the backup target UNC path, username and password in the config... and bypass any mount statement? Sound plausible?
 
Perhaps if the backup target media type = USB, then gray out the backup target UNC path, username and password in the config... and bypass any mount statement? Sound plausible?
Sounds to be spot on! 👍
 
Please give this a shot, @Quoc Huynh! Let's see if your USB drive stays mounted after a backup now! :)

What's new?
v1.32b2 - (TBA)
- 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 #6). When specifying the path to your Backup Target, you will also need to indicate whether it is a "Network" or "USB" target. In the case of a USB Backup Target (directly attached to your router), the script will no longer unmount the device after a backup has been completed. By default, "Network" is selected. Thanks much to @Quoc Huynh for the helpful suggestion!

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

Significant screenshots:

View attachment 53969
Wow, thank you so much @Viktor Jaep! You are legend 😍😍 I will try it when returning home tomorrow and let you know the result ^^
 
Wow, thank you so much @Viktor Jaep! You are legend 😍😍 I will try it when returning home tomorrow and let you know the result ^^
You got it... actually, please give beta 3 a chance below, @Quoc Huynh and @visortgw ... this one has some mods made where it will skip the mount statements if your target is a USB device. I still need to add some wording to explain why the UNC/username/pwd gets grayed out. Please let me know how it looks/functions... and if any of the messaging is off?

Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.32b3.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
 
Teating
You got it... actually, please give beta 3 a chance below, @Quoc Huynh and @visortgw ... this one has some mods made where it will skip the mount statements if your target is a USB device. I still need to add some wording to explain why the UNC/username/pwd gets grayed out. Please let me know how it looks/functions... and if any of the messaging is off?

Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.32b3.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
It as we speak!
 
You got it... actually, please give beta 3 a chance below, @Quoc Huynh and @visortgw ... this one has some mods made where it will skip the mount statements if your target is a USB device. I still need to add some wording to explain why the UNC/username/pwd gets grayed out. Please let me know how it looks/functions... and if any of the messaging is off?

Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.32b3.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
Everything looks great! 👌
 
Everything looks great! 👌
Probably going to re-work some stuff in the config menu based on these USB backup revelations... I'll probably ask if the target backup device is network/USB first... and if it's USB, using @Martinski's device mount picker to let them select the mounted USB device label... If it's network-based, let them fill in the blank with a preferred mount name.
 
Probably going to re-work some stuff in the config menu based on these USB backup revelations... I'll probably ask if the target backup device is network/USB first... and if it's USB, using @Martinski's device mount picker to let them select the mounted USB device label... If it's network-based, let them fill in the blank with a preferred mount name.
Sounds like you are just getting started 🤔.
 
I hate it when I change my own requirements after the fact... but this is really just a big grand ol' experiment! LOL
Until the next big grand ol' experiment, that is! :p
 
I hate it when I change my own requirements after the fact... but this is really just a big grand ol' experiment! LOL
Nice way to find out I'm a Guinea Pig.
😁
 
Nice way to find out I'm a Guinea Pig.
😁
A really, really smart guinea pig that knows how to run scripts on routers no less! That's impressive! Not just any guinea pig can do that! I'd be proud! Lol 🤣
 
OK... it's really starting to come together now... In fact, while I haven't exactly tested any of the backup scenarios using secondary USB devices or multiple partitions, it would seem that you could perform the following different types of backups:

Router USB Drive -> External network device/share (on your local network)
Router USB Drive -> Local network share (could be mounted to a secondary partition on your 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 seems plausible)
Router USB Drive Partition 1 -> Router USB Drive Partition 2 (kinda like the one above, but gives it a little more separation)

I know it was asked before... and if you do go down the path of backing your USB drive to your USB drive, I would definitely recommend using that exceptions.txt file, and try to exclude your backup location from being repeatedly being backed up. The safest way to store backups is far away from the device being backed up... so use at your own risk.

What's new? (here's a rehash of everything in this beta)
v1.32b4 -
- 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.
- 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!
- 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.

Download Link:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.32b4.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
 
Last edited:
- 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.
This feature gives it that nice, simple SSH rustic feel. No "fancy" colours popping to distract or warn of any pending dooms.
 

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!

Staff online

Top