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!

Small update today to shore up a few items after yesterday's release... many thanks to @Martinski for his help updating his code to eliminate some of the extraneous UBI drives that were showing up in the drive mount selector.

What's new?
v1.31 - (November 5, 2023)
- FIXED:
@Martinski was gracious enough to add a few fixes to his mount path selector function in order to eliminate some extraneous UBI drive references. Also, if only one external drive is attached, it will automatically select that without needing to display a selection menu.
- FIXED: Gave -purge mode a little more context on-screen, and fixed the exit back to a prompt after running since it incorrectly started a backup afterwards.
- MINOR: Fixed some grammar for a few on-screen messages based on the variable language they were displaying.

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

Significant screenshots:

Here you see that with only 1 attached USB drive, it will automatically select it and move on! :)
1699208715591.png
 
Wish it were that simple. It would be easier for me to redirect messaging to a separate logfile...
Not sure why you say that wouldn't work. If the variables are NOT defined, then expansion of entries like ${CWhite} return nothing; so the echo statements just output the plain text.
 
Not sure why you say that wouldn't work. If the variables are NOT defined, then expansion of entries like ${CWhite} return nothing; so the echo statements just output the plain text.
Guess that would be a decent workaround... let me play with it. ;)
 
Let me understand... what is the use-case for keeping your external backup path mounted? Even in a "Perpetual Backup" mode, it will only mount your backup target to write the backups, and then unmount it again. It only uses it when it needs it. In this particular mode, it just writes a unique date/time folder out there to your target folder, but has no other use to keep this drive mounted afterwards.

You aren't using your external USB flash drive as the source and target backup location, are you?
Thanks for your reply @Viktor Jaep! Regarding the USB flash drives, I use two different ones connecting with an AX88u router through 10-15cm extended cables. One flash drive is labelled Skynet, the other is Backup.
The reason for my question because after the Backup drive was unmounted automatically, Backupmon said that it could not be found for the next scheduled backup. Therefore, I had to remove and plugin it manually if I want to use the auto-backup function :)
 
Thanks for your reply @Viktor Jaep! Regarding the USB flash drives, I use two different ones connecting with an AX88u router through 10-15cm extended cables. One flash drive is labelled Skynet, the other is Backup.
The reason for my question because after the Backup drive was unmounted automatically, Backupmon said that it could not be found for the next scheduled backup. Therefore, I had to remove and plugin it manually if I want to use the auto-backup function :)
There must be something else going on here. When I say "unmount", I'm talking about the virtual drive path (/tmp/mnt/networkdrivelabel). Physically unmounting the USB is typically done through the FW UI. See anything in your syslogs about this?
 
Last edited:
There must be something else going on here. When I say "unmount", I'm talking about the virtual drive path (/tmp/mnt/drivelabel). Physically unmounting the USB is typically done through the FW UI. See anything in your syslogs about this?
@Quoc Huynh is using a second USB drive connected to his router as the backup target device.
 
@Quoc Huynh is using a second USB drive connected to his router as the backup target device.
Ahhh. I take it that unmounting a /tmp/mnt/flashdrivelabel would actually kick it off the router, so it's no longer visible to it?
 
Ahhh. I take it that unmounting a /tmp/mnt/flashdrivelabel would actually kick it off the router, so it's no longer visible to it?
Apparently so!
 
Apparently so!
Another use-case that I hadn't planned for. :( I guess I would need to capture what type of backup target something is... network or USB. And if it's USB, skip the unmount statements. Adding it to the to-do list! :)
 
Another use-case that I hadn't planned for. :( I guess I would need to capture what type of backup target something is... network or USB. And if it's USB, skip the unmount statements. Adding it to the to-do list! :)
You already check for potential source drives. If it is one of those, don't unmount.
 
Your wish is my command, @PeterT... and I hope @ColinTaylor can sleep a little easier tonight knowing that BACKUPMON can now function in B/W mode. LOL :p

What's new:
v1.32b1 - Early beta... give it a whirl!
- 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 for example 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.

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

Significant screenshots:

Behold BACKUPMON... in all its nostalgic B/W glory! (This was run using: /jffs/scripts/backupmon.sh -setup -bw)
1699225040442.png
 
Last edited:
Your wish is my command, @PeterT... and I hope @ColinTaylor can sleep a little easier tonight knowing that BACKUPMON can now function in B/W mode. LOL :p

What's new:
v1.32b1 - Early beta... give it a whirl!
- 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 for example 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.

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

Significant screenshots:

Behold BACKUPMON... in all its nostalgic B/W glory! (This was run using: /jffs/scripts/backupmon.sh -setup -bw)
View attachment 53962
Works like a charm :)
 
@Quoc Huynh is using a second USB drive connected to his router as the backup target device.
You are right 😊 I use a second USB drive, not a NAS, as a backup device just in case the entware USB drive would be faulty.
 
Another use-case that I hadn't planned for. :( I guess I would need to capture what type of backup target something is... network or USB. And if it's USB, skip the unmount statements. Adding it to the to-do list! :)
Thanks @Viktor Jaep. Much appreciated ^^
 
This thing is just growing and growing. The power of community.
Where will this stop?
 
This thing is just growing and growing. The power of community.
Where will this stop?
After the release of ABCMON and XYZMON... :p
 
Thanks @Viktor Jaep. Much appreciated ^^
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:

1699287684669.png
 

Similar 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