What's new

BACKUPMON BACKUPMON v1.8.20 -Oct 12, 2024- Backup/Restore your Router: JFFS + NVRAM + External USB Drive! CIFS/SMB/NFS! (Thread Closed!)

  • 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!

Nope. Take a look at the NVRAM.txt file.
I messed my wifi up so much on one occasion the radios stopped working with mac of 00:00:00:00:00:00.
Reset didn't fix. Flashing firmware didn't fix. BACKUPMON - no problem.
Some peeps don't realise how powerful this script actually is.
Interesting... I just can't imagine that the Asus router factory is pumping out router after router on the assembly line having to write a custom software config on each based on some unique MAC address that each device needs to have? If this isn't hardcoded or retrievable in some way from doing a factory reset, then I don't get it. Seems like a real flaw if that were the case?
 
Interesting... I just can't imagine that the Asus router factory is pumping out router after router on the assembly line having to write a custom software config on each based on some unique MAC address that each device needs to have? If this isn't hardcoded or retrievable in some way from doing a factory reset, then I don't get it. Seems like a real flaw if that were the case?
The unique factory settings of each router (like MAC addresses, serial number, etc.) are stored in a separate partition. When you do a factory reset the "user" settings are wiped and replaced with these factory settings.
 
I know. I can only provide anecdotal evidence, but that's how it happened.
I do wonder now if there may be certain areas of nvram that are retained in a reset, maybe just wishful thinking. The MAC addresses weren't restored by a three way reset.
Still, the discussion was about transferring settings between routers.
 
The unique factory settings of each router (like MAC addresses, serial number, etc.) are stored in a separate partition. When you do a factory reset the "user" settings are wiped and replaced with these factory settings.
Off-the-wall question, @ColinTaylor ... but is this partition accessible? Are there known scenarios where restoration of these settings could possibly fail as in @Ripshod's scenario above?
 
Off-the-wall question, @ColinTaylor ... but is this partition accessible? Are there known scenarios where restoration of these settings could possibly fail as in @Ripshod's scenario above?
I've come across cases where the factory partition had been wiped or corrupted. But that's not something that would fix itself and start working again so it sounds like @Ripshod situation was different.
 
Hi everyone,

I just came across this great utility and thank the dev for creating this.

I am working on configuring it for my use case.

I find the script defaults to backing up the USB drive connected to my router (AX86U). I am trying to exclude this.

The label to the drive is "4GB", so the mount location is "/tmp/mnt/4GB"

If I add "/tmp/mnt/4GB/*" to the exclusion list, the backup process still backs up the USB drive as "EXT Drive"

Same with "/tmp/mnt/4GB"

I am probably missing something simple and would appreciate being pointed in the right direction.

EDIT: I guess this drive is set as the "Source EXT USB Drive Mount Point" which is automatically backed up. Can't unselect this? Placing it on the exceptions list is ignored?
 
Last edited:
Hi everyone,

I just came across this great utility and thank the dev for creating this.

I am working on configuring it for my use case.

I find the script defaults to backing up the USB drive connected to my router (AX86U). I am trying to exclude this.

The label to the drive is "4GB", so the mount location is "/tmp/mnt/4GB"

If I add "/tmp/mnt/4GB/*" to the exclusion list, the backup process still backs up the USB drive as "EXT Drive"

Same with "/tmp/mnt/4GB"

I am probably missing something simple and would appreciate being pointed in the right direction.

EDIT: I guess this drive is set as the "Source EXT USB Drive Mount Point" which is automatically backed up. Can't unselect this? Placing it on the exceptions list is ignored?
Typically, the Ext USB drive is something you want to have backed up, incase you want to restore your router back to a point in time. It contains your entware partition and such... any reason you don't want it backed up? A restore may not be successful if you exclude this.

If you really want to go down this path, I'm thinking the only way to do it would be to just exclude the primary directories under the root... so, like:

Code:
entware/*
skynet/*
etc...
 
Typically, the Ext USB drive is something you want to have backed up, incase you want to restore your router back to a point in time. It contains your entware partition and such... any reason you don't want it backed up? A restore may not be successful if you exclude this.

If you really want to go down this path, I'm thinking the only way to do it would be to just exclude the primary directories under the root... so, like:

Code:
entware/*
skynet/*
etc...

Thanks for the ideas. Looking at my Ext USB, it doesn't contain anything necessary for the router to function, hence my wondering why it is backed up by default. It's used only as a network drive.

Specifically in my case, I have a NAS directory serving as a network backup folder on the Ext USB. It's not big, but I don't need that included on a router FW backup. I'll try adding the NAS directory.

EDIT: Hmm, nope, still backing up the whole drive. Maybe my syntax is off.
EDIT2: Yup, I was using "/mnt/tmp/4GB/NAS/*". Just needed to enter "NAS/*" like in your examples. Thanks again!
 
Last edited:
BACKUPMON

Started having weird issues with dnsmasq upon reboot, and AC86u was spitting out occasional errors like this:

Code:
Apr 29 06:45:00 kernel: jffs2: notice: (360) check_node_data: wrong data CRC in data node at 0x00b5596c: read 0x90888718, calculated 0x3334fa3.
Apr 30 04:05:06 kernel: jffs2: notice: (360) check_node_data: wrong data CRC in data node at 0x011e2254: read 0xe1f9e16b, calculated 0xa929aaea.
May  1 04:05:05 kernel: jffs2: notice: (360) check_node_data: wrong data CRC in data node at 0x019f271c: read 0x386b2e11, calculated 0x2951c2a8.
May  3 06:45:00 kernel: jffs2: jffs2_scan_inode_node(): CRC failed on node at 0x0167d7f0: Read 0xffffffff, calculated 0x66255ced

Decided to take a plunge and reformat /jffs. Scripts off setting, reboot. /jffs format setting, reboot. Logged in with ssh, followed the restore instructions here, with 1 exception. Renamed main entware backup to gz_, since I kept the entware drive as is. Thanks - the script failed gracefully when it could not find this backup, just asked me to continue :) Excellent programming!!!

Will see if this fixes my dnsmasq issue ...

Code:
Enter the Day # of the backup you wish to restore? (ex: 02 or 27) (e=Exit):
02

WARNING: You will be restoring a backup of your JFFS, the entire contents of your External
USB drive and NVRAM back to their original locations.  You will be restoring from this backup location:
/tmp/mnt/spare/router/AC86U-Backup/02/

LAST CHANCE: Are you absolutely sure you like to continue to restore from backup?
[y/n]? y

Restoring /tmp/mnt/spare/router/AC86U-Backup/02/jffs.tar.gz to /jffs
Restoring /tmp/mnt/spare/router/AC86U-Backup/02/ac86u.tar.gz to /tmp/mnt/ac86u
tar: can't open '/tmp/mnt/spare/router/AC86U-Backup/02/ac86u.tar.gz': No such file or directory
ERROR: TAR errors detected on restore to /tmp/mnt/ac86u
Would you like to proceed with the restoration process?

[y/n]? y

Proceeding...


Restoring /tmp/mnt/spare/router/AC86U-Backup/02/nvram.cfg to NVRAM

STATUS: Backups were successfully restored to their original locations. Forcing reboot now!
 
Started having weird issues with dnsmasq upon reboot, and AC86u was spitting out occasional errors like this:

Decided to take a plunge and reformat /jffs. Scripts off setting, reboot. /jffs format setting, reboot. Logged in with ssh, followed the restore instructions here, with 1 exception. Renamed main entware backup to gz_, since I kept the entware drive as is. Thanks - the script failed gracefully when it could not find this backup, just asked me to continue :) Excellent programming!!!

Will see if this fixes my dnsmasq issue ...
Hope it gets you back to square one, @bibikalka! Good luck!! ;)
 
Thank Viktor for creating this great tool. I have been looking for it.
I am trying to set it up, no matter what I try I always end up with the mounting errors below. Please can you guide me on what I am doing wrong?
I checked the correct IP of the synology, share, and credential using smbclient -L //192.168.11.13 from anUbuntu client.
The router is a RT-AC68U FW3004.385.13_0 with amtm 4.5.2 and, of cource, BACKMON 1.7.2.

Thank for your advice on possible steps to set it up correctly.


1715082070017.png
 
Hi @Javieruu ... Happy to try to help! So, you are running some pretty old hardware, with some very old firmware... Not even sure what version of SMB is supported with that... but have you tried lowering the version? Perhaps 1.0? 2.0? 2.1? What is the lowest version that your synology is capable of? See if you can find a match? The other obvious thing is permissions from the synology side. Can you connect to it successfully to log in and see your directory structures? The next hurdle would be doing the same from the router.

If you can get this statement to work from the router without error, then backupmon should work for you as well...

Code:
mount -t cifs \\\\192.168.11.13\\home /tmp/mnt/backups -o "vers=2.0,username=myname,password=mypass"
 
I am also using Synology NAS — DS718+/DS918+ with DSM 7.2.1-69057 Update 5. I have enabled SMB3 on NAS via DSM web UI using File Services >> SMB >> Advanced Settings >> Maximum SMB protocol.

My BACKUPMON settings which work are as follows:
Code:
 (1)  : Source EXT USB Drive Mount Point             : /tmp/mnt/TheS1RsUSB
  (2)  : Backup Target Media Type                     : Network
  (3)  : Backup Target Username                       : rsync
  (4)  : Backup Target Password (ENC)                 : xxxxxxxxxxxxxxxxxxxxxxxx
  (5)  : Backup Target Path                           : \\\\192.168.222.5\\NetBackup
   |----  NFS Mount Options?                          : N/A
  (6)  : Backup Target Mount Point                    : /tmp/mnt/NetBackup1
  (7)  : Backup Target Directory Path                 : /TheS1RsGT-AX6000
  (8)  : Backup Exclusion File Name                   : /jffs/addons/backupmon.d/exclusions
  (9)  : Backup Swap File                             : No
  (10) : Backup CIFS/SMB Version                      : 3.02
  (11) : Backup Frequency                             : Monthly
 
Thank you to both of you for the great guidance and information.

The router is currently supporting vers=2.0 as I could check using nmap --script smb-protocols from an Ubuntu client.

SSH-ed the Code "mount -t ...", posted above, from the router to Synology after taking it down to vers=1.0; the 'failed: Operations not supported' message is gone, however, the 'failed: Permission denied' is now raised. Checking Synology logs, it is due to attempting to log in with NTLMv1, which is not permitted any longer since Synology DSM OS 7.0 due to security risks.

SMB log-in and access to Synology shares using Ubuntu and Windows client work. Also, access to router shares from Windows client works.

This brings me back to the need to work out an SMB connection at least with vers=2.0 to avoid security risks.

I appreciate any idea you might have of what could be other reasons for still having the 'failed: Operations not supported' error if both, the router and Synology are using vers=2.0.

Thank you in advance.
 
Thank you to both of you for the great guidance and information.

The router is currently supporting vers=2.0 as I could check using nmap --script smb-protocols from an Ubuntu client.

SSH-ed the Code "mount -t ...", posted above, from the router to Synology after taking it down to vers=1.0; the 'failed: Operations not supported' message is gone, however, the 'failed: Permission denied' is now raised. Checking Synology logs, it is due to attempting to log in with NTLMv1, which is not permitted any longer since Synology DSM OS 7.0 due to security risks.

SMB log-in and access to Synology shares using Ubuntu and Windows client work. Also, access to router shares from Windows client works.

This brings me back to the need to work out an SMB connection at least with vers=2.0 to avoid security risks.

I appreciate any idea you might have of what could be other reasons for still having the 'failed: Operations not supported' error if both, the router and Synology are using vers=2.0.

Thank you in advance.
Try version 2.1 or 2.2.
 
Thank you to both of you for the great guidance and information.

The router is currently supporting vers=2.0 as I could check using nmap --script smb-protocols from an Ubuntu client.

SSH-ed the Code "mount -t ...", posted above, from the router to Synology after taking it down to vers=1.0; the 'failed: Operations not supported' message is gone, however, the 'failed: Permission denied' is now raised. Checking Synology logs, it is due to attempting to log in with NTLMv1, which is not permitted any longer since Synology DSM OS 7.0 due to security risks.

SMB log-in and access to Synology shares using Ubuntu and Windows client work. Also, access to router shares from Windows client works.

This brings me back to the need to work out an SMB connection at least with vers=2.0 to avoid security risks.

I appreciate any idea you might have of what could be other reasons for still having the 'failed: Operations not supported' error if both, the router and Synology are using vers=2.0.

Thank you in advance.
Not sure if this is needed on your router, but try running this statement first:

Code:
modprobe md4

Then, try the mount:

Code:
mount -t cifs \\\\192.168.11.13\\home /tmp/mnt/backups -o "vers=2.0,username=myname,password=mypass"
 
@Javieruu I could hardly sleep last night... please tell me you were successful! :)
 
Thank you @Jeffrey Young for your suggestion; to my knowledge, Asuswrt-Merlin 386.13 firmware only implements the SMB 2.02 version, is there any way to install the SMB 2.1 or 2.2 versions?

Thank you @Viktor Jaep, I tried modprobe md4 and it reports modprobe: module md4 not found in modules.dep. I believe it might mean the md4 module is not needed.
 
Thank you @Jeffrey Young for your suggestion; to my knowledge, Asuswrt-Merlin 386.13 firmware only implements the SMB 2.02 version, is there any way to install the SMB 2.1 or 2.2 versions?

Thank you @Viktor Jaep, I tried modprobe md4 and it reports modprobe: module md4 not found in modules.dep. I believe it might mean the md4 module is not needed.
Correct concerning the md4 module. Only certain routers requires it.

I have one old NAS that I must connect via 2.1. 2.0 and 2.2 does not work. Yet another device is reverse, it must be set to vers 2.2. it all depends on your client that you are trying to connect to. What is the error you get when trying to manually mount the share?
 
I have one old NAS that I must connect via 2.1. 2.0 and 2.2 does not work. Yet another device is reverse, it must be set to vers 2.2. it all depends on your client that you are trying to connect to. What is the error you get when trying to manually mount the share?
Just wondering... Is the version of SMB dependent on the kernel version available for the router, or based on the firmware available? Not sure where it gets bumped up from 2.x to 3.x etc...
 

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