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!

And if people are running Asus SOHO routers with Merlin FW in a Data Center... and expecting NFS to back up their router... then THEY are the one with problems! LOL
WDYM!?!? NFS is like the WD-40 and duck tape of the routing world just like SNMP. Never leave home without it, eh?

However, you are definitely right. And what you have done here with BACKUPMON for our ASUS SOHO routers running Merlin FW is beautiful! Thank you for all your hard work!
 
Hello...Thank you for this awesome script!

Is it normal to be stuck at the "socket ignored" line?

STATUS: External Drive (\\bkuplcl\public) mounted successfully under: /tmp/mnt/backups
STATUS: Backup Directory successfully created.
STATUS: Daily Backup Directory successfully created.
STATUS: Finished backing up JFFS to /tmp/mnt/backups/router/GT-AX6000-Backup/03/jffs.tar.gz.
STATUS: Finished backing up NVRAM to /tmp/mnt/backups/router/GT-AX6000-Backup/03/nvram.cfg.
STATUS: Finished copying routerfw.txt to /tmp/mnt/backups/router/GT-AX6000-Backup/03/routerfw.txt.
tar: ./entware/tmp/screens/S-admin/10095.pts-0.Router: socket ignored

Doesn't do anything after this. What am I doing wrong here?
 
How much data is on your usb drive?
The socket messages pop up while the compression is being done. The compression will still carry on until complete. If you have a lot of data it can take a very loooooong time.
 
Doesn't do anything after this. What am I doing wrong here?
Like @Ripshod said... let it try to finish. You may have a ton of data, not excluding your swap file, or your USB drive might be slooowww. ;)
 
Oh OK, you folks are right, I don't have much data, maybe a couple of gigs. I let it run overnight (I'm in the Middle East) and it did finish. The size of the folder is 1.47 GB sitting on an older Samsung SLC SSD (not that fast but faster than most USB sticks). In such cases, a time stamp would allow one to see just how long it takes. Is it possible to add it before the word "STATUS"? Just an unsolicited suggestion :)

Thank you guys! Time to reset my router. I am not planning to restore it immediately because I have had this persistent problem with the router not allowing certain WiFi connections after a few days of usage. Gonna try a virgin installation first.
 
Have not really looked at your script @Viktor Jaep , can you specify a verbose option on the command line?

If not, perhaps an enhancement for the future for test runs just to see progress when manually run.
 
In such cases, a time stamp would allow one to see just how long it takes. Is it possible to add it before the word "STATUS"? Just an unsolicited suggestion :)
if not, perhaps an enhancement for the future for test runs just to see progress when manually run.
Sounds like a great suggestion... though with some simple math, you could figure this out from the syslog itself ... or even just a "Backup starting at X"... so you have a little progress indicator.
 
Feeling like a BOGO today... on the heels of a VPNMON-R2 release, so here comes an update to BACKUPMON...

What's new?
v1.30 - (November 4, 2023)
- ADDED
: Implemented an awesome EXT USB drive mount path selector, courtesy of @Martinski! This nice feature now allows you to pick a drive/partition other than sda1, which was the only supported backup source up until now. This selector is available under configuration menu item #4. If an alternate selection is not made, by default it will continue to backup your EXT USB drive that is mapped to sda1. Please note: BACKUPMON will only backup 1 drive/partition. It does not and will not support configurations consisting of multiple partitions.
- ADDED: Included the EXT USB drive mount path on the top of the screen when backups run, which is displayed alongside other settings, to give you some quick at-a-glance feedback on what's being backed up, where.
- ADDED: Included the amount of time a backup takes, and will now show an on-screen status that the main EXT USB backup is starting, and to please stand by... It will calculate and show how many seconds the backup took, and will also write this same info to the syslog. Thanks to @monakh for the good suggestion!
- FIXED: When a regular backup runs with purge enabled, I have fixed the screen output to now flow along with the regular backup feedback, and no longer clears screens/displays BACKUPMON headers, etc.

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

Significant screenshots:

The awesome EXT USB drive mount path selector courtesy of @Martinski!
1699124479031.png


Some visual changes, giving you a little more info when the backup kicks off...
1699124522629.png


Showing some time stats on when the main EXT USB drive kicks off, and how long it takes to backup... thanks to @monakh!
1699124600783.png
 
Any thought to either providing a command line switch to remove the use of terminal escape characters, or disabling their use in case of a non interactive execution of the script (ie running via cron with output redirected to a file)?
 
Feeling like a BOGO today... on the heels of a VPNMON-R2 release, so here comes an update to BACKUPMON...

What's new?
v1.30 - (November 4, 2023)

...
MountPointSelectionMenu.png


Earlier today I submitted a GitHub PR to filter out the extraneous menu entries (shown in the above screenshot) from the USB drive mount point selection routine. Please take a look and verify that the changes remove the unwanted menu entries. I don't have an ASUS router that has UBIFS.

HTH.
 
- ADDED: Implemented an awesome EXT USB drive mount path selector, courtesy of @Martinski! This nice feature now allows you to pick a drive/partition other than sda1, which was the only supported backup source up until now. This selector is available under configuration menu item #4. If an alternate selection is not made, by default it will continue to backup your EXT USB drive that is mapped to sda1. Please note: BACKUPMON will only backup 1 drive/partition. It does not and will not support configurations consisting of multiple partitions.
Thanks for the update, appreciate your dedication to suit to almost all user cases.
Does it help with the device selection in BACKUPMON if I would encourage to label devices when formatting with amtm with something like this?
Code:
Set device label for

 <device>

1. Set label, highly recommended
   especially if addon BACKUPMON is used
2. No label

Enter selection [1-2]
 
Thank you @Viktor Jaep for your great scripts! It makes backup flawlessly on my external USB flash drive 😍 However, is there any method for automatically re-mounting the drive? Because I want to use the Perpetual backup function, but the flash drive is unmounted after each backup, and thus not available afterwards.
 
Thank you @Viktor Jaep for your great scripts! It makes backup flawlessly on my external USB flash drive 😍 However, is there any method for automatically re-mounting the drive? Because I want to use the Perpetual backup function, but the flash drive is unmounted after each backup, and thus not available afterwards.
I was wondering the same thing.
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 the update, appreciate your dedication to suit to almost all user cases.
Absolutely! :)
Does it help with the device selection in BACKUPMON if I would encourage to label devices when formatting with amtm with something like this?
Code:
Set device label for

 <device>

1. Set label, highly recommended
   especially if addon BACKUPMON is used
2. No label

Enter selection [1-2]
Oh I think that would help tremendously! Drive labels are highly encouraged, and think it would be great to help the user get off to a good start right from the beginning! Thank you!
 
Any thought to either providing a command line switch to remove the use of terminal escape characters, or disabling their use in case of a non interactive execution of the script (ie running via cron with output redirected to a file)?
I'm assuming you're talking about the color escape sequences you'd see in the output if you did something like this?

Code:
/jffs/scripts/backupmon.sh -backup > /jffs/scripts/output.txt

Short answer: no... never considered someone would either not want color, or wanted to redirect output of the screen. One thing that could be done is basically redirect all screen output to a log file of sorts... so in lieu of redirecting output, you could just reference the log file? I can add that one to my list.
 
I'm assuming you're talking about the color escape sequences you'd see in the output if you did something like this?

Code:
/jffs/scripts/backupmon.sh -backup > /jffs/scripts/output.txt

Short answer: no... never considered someone would either not want color, or wanted to redirect output of the screen. One thing that could be done is basically redirect all screen output to a log file of sorts... so in lieu of redirecting output, you could just reference the log file? I can add that one to my list.
I'm already redirecting to a log file; it's just frankly, a lot of garbage for viewing via less / vi.

All that would be needed is an option add (say -nocolour) and then in the script only execute the lines defining the colours if the option was not specified.
 
I'm already redirecting to a log file; it's just frankly, a lot of garbage for viewing via less / vi.

All that would be needed is an option add (say -nocolour) and then in the script only execute the lines defining the colours if the option was not specified.
Wish it were that simple. It would be easier for me to redirect messaging to a separate logfile...
 
I'm already redirecting to a log file; it's just frankly, a lot of garbage for viewing via less / vi.

All that would be needed is an option add (say -nocolour) and then in the script only execute the lines defining the colours if the option was not specified.
I hate with a passion multicolored output in scripts. You could use something like this to try and strip out the color codes:

Code:
/jffs/scripts/backupmon.sh -backup | sed 's/[[:cntrl:]]\[[0-9;]*m//g'
I have no idea whether this will work with this particular script.
 
I hate with a passion multicolored output in scripts. You could use something like this to try and strip out the color codes:
Let us know how you really feel, @ColinTaylor! LOL!

Code:
/jffs/scripts/backupmon.sh -backup | sed 's/[[:cntrl:]]\[[0-9;]*m//g'
I have no idea whether this will work with this particular script.
Actually, that did work... perfectly, in fact! Nice job! :)
 

Sign Up For SNBForums Daily Digest

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