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!

Thanks for this, @Martinski! Your changes were merged with the latest backupmon-1.32b4.sh file. Nice to know that this will no longer be a show stopper for others with unexpected characters in their drive labels. ;)

For you beta testers... Please update your copy of backupmon with this latest version:
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"
I just discovered an annoying "bug" (at least in my opinion) in the latest beta. If you have USB device as destination but have not encoded password (which of course is grayed out/not used), there is a warning about plaintext password(s). This keeps cron jobs from completing. Workaround until @Viktor Jaep is bored for two minutes is to encode default password (i.e., admin).
 
Last edited:
I just discovered any annoying "bug" (at least in my opinion) in the latest beta. If you have USB device as destination but have not encoded password (which of course is grayed out/not used), there is a warning about plaintext password(s). This keeps cron jobs from completing. Workaround until @Viktor Jaep is bored for two minutes is to encode default password (i.e., admin).
I'll nip this one... thanks for uncovering it!
 
I'll nip this one... thanks for uncovering it!
I couldn't figure out why scheduled backup had not run for one of the routers that I manage so I just had to dig deeper before retiring for the night...
 
Another fleeting thought... When you create the cron job for a scheduled backup, why is the command in the cron entry "sh /jffs/scripts/backupmon.sh" as opposed to "sh /jffs/scripts/backupmon.sh -backup"?
 
Another fleeting thought... When you create the cron job for a scheduled backup, why is the command in the cron entry "sh /jffs/scripts/backupmon.sh" as opposed to "sh /jffs/scripts/backupmon.sh -backup"?
This is something I'm going to add to the scheduler, to get a preference before it creates the cron job. The original way doesn't run a purge afterwards, which some people may want to do manually. Running it with the -backup switch runs the auto purge
 
Off to Beta5! This one includes the fixes identified by @visortgw -- namely, the annoying bug when picking USB, and how it was complaining about plaintext passwords... as well as now the option to pick using the "backupmon -backup" switch when going through the scheduler in the config menu under item #11. Also, huge thanks to @Martinski for his continued efforts perfecting his filters to pick up on invalid characters in people's drive labels!

What's new since Beta4!?
v1.32b5 - (TBA)
- 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.
- 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, even though 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 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"

Significant Screenshots:

Showing the new item under scheduling backups to determine if you want to just backup, or do backups + autopurge
1699558697841.png
 
Hi @Viktor Jaep - great tool! Especially for us lazy script writers ;)
The only problem for me right now is the mount limitation on my AC88U kernel 2.6.36, which only supports SMB1 and NTLMv1. Out of interest - would you consider adding routine that would perform backups using smbclient (available in entware) as an option additional to mount and USB targets? It basically works as an FTP client (commands can be parsed), but supports modern SMB capabilities / security patches.
 
Hi @Viktor Jaep - great tool! Especially for us lazy script writers ;)
The only problem for me right now is the mount limitation on my AC88U kernel 2.6.36, which only supports SMB1 and NTLMv1. Out of interest - would you consider adding routine that would perform backups using smbclient (available in entware) as an option additional to mount and USB targets? It basically works as an FTP client (commands can be parsed), but supports modern SMB capabilities / security patches.
Thank you @Phantomski! I'm also running backupmon on an older AC86U with 386.12 without any issue... I will need to hop on later to see what kernel it's got, but I would think it would be similar if not the same as your AC88U? What kind of issues have you run into?
 
Hi @Viktor Jaep - great tool! Especially for us lazy script writers ;)
The only problem for me right now is the mount limitation on my AC88U kernel 2.6.36, which only supports SMB1 and NTLMv1. Out of interest - would you consider adding routine that would perform backups using smbclient (available in entware) as an option additional to mount and USB targets? It basically works as an FTP client (commands can be parsed), but supports modern SMB capabilities / security patches.
@Phantomski what is your use case for this? You explained in another thread, in regards to smb2, that you were just experimenting? RT-AC88U is EOL.
 
Thank you @Phantomski! I'm also running backupmon on an older AC86U with 386.12 without any issue... I will need to hop on later to see what kernel it's got, but I would think it would be similar if not the same as your AC88U? What kind of issues have you run into?
AC86U uses 4.1.27 kernel which supports SMB2, unlike AC88U which uses 2.6.36 and only supports SMB1. The problem is that I don’t want to use SMB1 due to security implications, so the script basically won’t connect to my NAS. Even if I enable SMB1 explicitly, it also needs NTLMv1 authentication (if you can even call it that) and that’s way too big jump down the memory lane ;)
 
@Phantomski what is your use case for this? You explained in another thread, in regards to smb2, that you were just experimenting? RT-AC88U is EOL.
The experimenting was in terms of trying to still make it work. My use case is regular backups of main on-site router to my NAS, which is using SMB2.1+ only.

It is EOL, I know. I don’t want to add more workload for anyone of course, just asking if it could be/is considered. It is a neat script and I personally think smbclient > mount.cifs (capabilities, performance, security, support) so it would be great if it was supported. Of course if not an option - well not an option, I’ll have to try my own, it’s not a big deal.
 
The experimenting was in terms of trying to still make it work. My use case is regular backups of main on-site router to my NAS, which is using SMB2.1+ only.

It is EOL, I know. I don’t want to add more workload for anyone of course, just asking if it could be/is considered. It is a neat script and I personally think smbclient > mount.cifs (capabilities, performance, security, support) so it would be great if it was supported. Of course if not an option - well not an option, I’ll have to try my own, it’s not a big deal.
@Phantomski ... I took a look at smbclient... seems a bit cludgy. :( Unless I'm incorrect about it's general use/functionality, it would seem that the file you're trying to copy over has to be in existence already. That will make it difficult, as the tar.gz of your entire external USB drive would need to be completed in its entirety locally, onto itself, before copying it over. Might deal with space issues, and also some file management fun that would require files to be deleted after copying to free up space. Restoration procedures might also be challenging when trying to 'get' the entire file back locally before restoring it onto itself. Second, in dealing with these alternative network file copying tool requests if the router doesn't support a wider standard... where would it end? Someone might request support using FTP or curl next. I'm really sorry, but unfortunately I'm going to have to respectfully decline and continue supporting one of the more widely compatible network copy/connection methods that is supported by the vast majority of routers running current versions of Merlin FW.

If you do come up with a script that works for your needs using smbclient, please do share it, so that others in the same situation might be able to make use of it! Thank you!
 
Last edited:
Off to Beta5! This one includes the fixes identified by @visortgw -- namely, the annoying bug when picking USB, and how it was complaining about plaintext passwords... as well as now the option to pick using the "backupmon -backup" switch when going through the scheduler in the config menu under item #11. Also, huge thanks to @Martinski for his continued efforts perfecting his filters to pick up on invalid characters in people's drive labels!

What's new since Beta4!?
v1.32b5 - (TBA)
- 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.
- 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, even though 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 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"

Significant Screenshots:

Showing the new item under scheduling backups to determine if you want to just backup, or do backups + autopurge
View attachment 54050
Thanks again @Viktor Jaep! It works perfectly for me, no more message of changing password and missing preset cron job 🥰

The screenshot shows a manual backup, and the text code is for a perpetual backup cron job set at 13:55.

Code:
Nov 10 13:55:01 Gaubong: BACKUPMON INFO: Finished backing up JFFS to /tmp/mnt/Backup/router/AX88U-Backup/20231110-135500/jffs.tar.gz
Nov 10 13:55:04 Gaubong: BACKUPMON INFO: Finished backing up NVRAM to /tmp/mnt/Backup/router/AX88U-Backup/20231110-135500/nvram.cfg
Nov 10 14:00:13 Gaubong: BACKUPMON INFO: Finished backing up EXT Drive in 307 sec to /tmp/mnt/Backup/router/AX88U-Backup/20231110-135500/Skynet.tar.gz
Nov 10 14:00:24 Gaubong: BACKUPMON INFO: No perpetual backup folders were identified older than 90 days. Nothing to delete.
 

Attachments

  • 2.png
    2.png
    184.2 KB · Views: 17
@Phantomski ... I took a look at smbclient... seems a bit cludgy. :( Unless I'm incorrect about it's general use/functionality, it would seem that the file you're trying to copy over has to be in existence already. That will make it difficult, as the tar.gz of your entire external USB drive would need to be completed in its entirety locally, onto itself, before copying it over. Might deal with space issues, and also some file management fun that would require files to be deleted after copying to free up space. Restoration procedures might also be challenging when trying to 'get' the entire file back locally before restoring it onto itself. Second, in dealing with these alternative network file copying tool requests if the router doesn't support a wider standard... where would it end? Someone might request support using FTP or curl next. I'm really sorry, but unfortunately I'm going to have to respectfully decline and continue supporting one of the more widely compatible network copy/connection methods that the vast majority of routers running current versions of Merlin FW that support this functionality.

If you do come up with a script that works for your needs using smbclient, please do share it, so that others in the same situation might be able to make use of it! Thank you!
No you're absolutely right, I completely forgot we're quite limited in space/writes so creating a local tar is not a great option. smbclient has a tarmode, but (surprise surprise) it's not compiled in the entware's version.
Thanks for thinking about it anyway, much appreciated. I'll move it up a notch soon hopefully with a router upgrade.
 
I'll move it up a notch soon hopefully with a router upgrade.
You're welcome, @Phantomski ... That right there is really your best bet. Hopefully you will find a sweet deal for Black Friday (deals are starting to happen now)... that's how I ended up with a really great discount on my GT-AX6000 last year! :)
 
Last edited:
You're welcome, @Phantomski ... That right there is really your best bet. Hopefully you will find a sweet deal for Black Friday (deals are starting to happen now)... that's how I ended up with a really great discount on my GT-AX6000 last year! :)
That's the plan ;) So far it's "down" to £280, hoping for some decent drop.

Btw, here's my interim solution (don't laugh, thinking outside the box):
- spin up Ubuntu Docker container
- install smbd
- allow legacy SMB settings (server min protocol = NT1 and ntlm auth = yes)
- make BACKUPMON on the router to backup to this container
- mount the container's backup dir to NAS using modern cifs
- 🤷‍♂️😂

Sorry for hijacking your thread.
 
That's the plan ;) So far it's "down" to £280, hoping for some decent drop.
Unless the British Amazon page shows something different, the best deal for the GT-AX6000 is down to $259 in the US here (£211): https://www.amazon.com/dp/B09L8PCTPT/?tag=snbforums-20

Same deal at newegg.com: https://www.newegg.com/asus-gt-ax6000/p/N82E16833320517

Btw, here's my interim solution (don't laugh, thinking outside the box):
- spin up Ubuntu Docker container
- install smbd
- allow legacy SMB settings (server min protocol = NT1 and ntlm auth = yes)
- make BACKUPMON on the router to backup to this container
- mount the container's backup dir to NAS using modern cifs
- 🤷‍♂️😂

Sorry for hijacking your thread.
No worries! That is an excellent workaround for the current situation!! :)
 
As usual the UK Amazon and other stores are much more expensive that the US. That product on Amazon UK is £312 ($381).
I could make a killing buying these locally, and sending them across the pond for a small fee! LOL :p
 
I could make a killing buying these locally, and sending them across the pond for a small fee! LOL :p
Yeah, you could. After [B word] everything in UK is [US number] in £ + customs + VAT + import fee + a bit. Not great.
 

Latest threads

Sign Up For SNBForums Daily Digest

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