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 we're off to the next major functionality change... being able to pick whichever mount point you want backed up (since your critical ext usb could be sda1 or sdb1 or sdc2, and they could be flipping!), with many thanks to @Martinski for his awesome mount point picker... can't wait to use it! :) This will unfortunately mean people will need to go back into their config and make a modification again... I'm so sorry. Growing pains. LOL Beta coming soon!

Also... based on the poll results, nearly 85% of you are using single partitions. So I'm also just going to stick with supporting single partitions... people with multiple partitions know what they're doing to keep themselves safe since it takes some serious know-how to keep all that separated on a single drive.

Big thing though... Drive labels are important! We don't want any blank ext usb drive labels, else it just makes things more difficult on the restore. We want to make sure that a restore is going back to the same place it came from... just keep that in mind, and label your drive!
 
And we're off to the next major functionality change... being able to pick whichever mount point you want backed up (since your critical ext usb could be sda1 or sdb1 or sdc2, and they could be flipping!), with many thanks to @Martinski for his awesome mount point picker... can't wait to use it! :) This will unfortunately mean people will need to go back into their config and make a modification again... I'm so sorry. Growing pains. LOL Beta coming soon!

Also... based on the poll results, nearly 85% of you are using single partitions. So I'm also just going to stick with supporting single partitions... people with multiple partitions know what they're doing to keep themselves safe since it takes some serious know-how to keep all that separated on a single drive.

Big thing though... Drive labels are important! We don't want any blank ext usb drive labels, else it just makes things more difficult on the restore. We want to make sure that a restore is going back to the same place it came from... just keep that in mind, and label your drive!
Bring on the beta!
 
I am very happy with this backupmon, and it works very good, i have used it one time and controlled it.
I made a mistake, and have to restore the backup, and it worked.

for install: showmount -e <nfshareserver> to look for the name of the nfsshare for the config of backupmon

what is missed in the program is a logfile for the backupmon to check, you can find it in the syslog or you can control the backup on the nfs share.

beautifull work, thanks
 
It is a Qnap NAS and I am able to ping it from the router. I currently run rsync from my router to it, but was considering changing to your solution.

When I run the exportfs command on the NAS, I can see that I allowed the NAS to accept router's IP address and attach to the share:

Code:
/share/CACHEDEV1_DATA/Backups
                10.0.100.1(async,wdelay,hide,no_subtree_check,fsid=04d973109165951ada4e99d847f91064,sec=sys,rw,insecure,no_root_squash,no_all_squash)

/share/NFSv=4/Backups
                10.0.100.1(async,wdelay,nohide,no_subtree_check,fsid=058ec201d704c71e6e9713e205279b89,sec=sys,rw,insecure,no_root_squash,no_all_squash)

I also deleted the directory I created, but still the same error persists:

Code:
Selection: t

Messages:
ALERT: External Drive directory not set. Created test directory under: /tmp/mnt/primary
mount: mounting \\10.0.100.90\Backups on /tmp/mnt/primary failed: Connection refused
WARNING: Unable to mount to external drive. Retrying...
mount: mounting \\10.0.100.90\Backups on /tmp/mnt/primary failed: Connection refused
WARNING: Unable to mount to external drive. Retrying...
ERROR: Unable to mount to external drive (/tmp/mnt/primary). Please check your configuration. Exiting.
ERROR: Failed to run Network Connect Test Script -- Drive mount failed. Please check your configuration!
Press any key to acknowledge...

If you are up to editing the script yourself, you can use your own mount statement. You can try

mount -t nfs 10.0.100.90:/Backups /tmp/mnt/primary -o "nfsvers=3,nolock,_netdev,rsize=8192,wsize=8192"

If that fails, you may need to run the following two commands before the mount statement;

Code:
modprobe nfs nfsv3
[ $(pidof mountd) ] || /usr/sbin/mountd -N 2

With this setup, I was able to mount a NFS share on a test Ubuntu VM from my AX88U.

Just to note that if the above works for you, we may have to do some other changes in NVRAM as I suspect that Asus's watchdog will nuke mountd if NFS is not turned on in the Server Centre part of the GUI.

In my testing, the hang-up was not specifying the nfsvers parameter. Also note, that since the router will be "signing in" as root, you will need to keep the no_root_squash option on you NAS. Otherwise, your NAS will reject root.

If editing @Viktor Jaep script is not your cup of tea, you can make your own script or modify my original script.

Let me know how this works out.
 
Also note, that since the router will be "signing in" as root, you will need to keep the no_root_squash option on you NAS. Otherwise, your NAS will reject root.
"reject root" is a bit misleading IMHO. If the client is root and no_root_squash is in effect the client can create files with root ownership (assuming the directory permissions allow it). If root_squash is in effect then those files would be created with an ownership of nobody/nogroup.
 
Last edited:
"reject root" is a bit misleading IMHO. If the client is root and no_root_squash is in effect the client can create files with root ownership (assuming the directory permissions allow it). If root_squash is in effect then those files would be created with an ownership of nobody/nogroup.
Yeah, I was trying to keep it simple. NFS is, seemingly, a bit of a dying thing. But, I agree with your statement.
 
If you use UUID would you still be able to restore to a new (or reformatted) usb ssd?
UUID can be preserved if you do a full clone of the drive that preserves the partition tables (block level cloning, DD Command).
 
Last edited:
UUID can be preserved if you do a full clone of the drive that preserves the partition tables (block level cloning, DD Command).
But then you wouldn't have the empty drive necessary to restore to, unless you clone the drive when it's freshly formatted(?). To use UUID would necessitate drive cloning - not convenient when recovering from disaster.

As an aside, my daily backups have reached 284MB.
 
UUID can be preserved if you do a full clone of the drive that preserves the partition tables (block level cloning, DD Command).
Very true and UUID is handy when dealing with more than a few drives when formatting, labeling etc.

But the UUID strings are very convoluted for us humans.

Labeling a parition on these routers are very simple, even after formatting. And you pick the name.

tune2fs is your friend (and available on the router)
 
You guys get no breaks!! :p

What's new!?
v1.28b1 - (TBA)
- 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.
- 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:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.28b1.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"

1698288110041.png


Enjoy!
 
Last edited:
Yeah, I was trying to keep it simple. NFS is, seemingly, a bit of a dying thing. But, I agree with your statement.
@Jeffrey Young @ColinTaylor ... Seeing this about NFS losing its luster... is it worth even pursuing this at this point? Is NFS a must-have, seeing that most equipment can probably also handle CIFS/SMB? Not familiar with @Goobi's particular Qnap device, or how easy it would be to also flip the switch to support CIFS? Seems like there's some hurdles to jump through in order to get NFS working with root/permissions, etc? Trying to gauge whether NFS support is something that needs to be pursued or not.
 
@Jeffrey Young @ColinTaylor ... Seeing this about NFS losing its luster... is it worth even pursuing this at this point? Is NFS a must-have, seeing that most equipment can probably also handle CIFS/SMB? Not familiar with @Goobi's particular Qnap device, or how easy it would be to also flip the switch to support CIFS? Seems like there's some hurdles to jump through in order to get NFS working with root/permissions, etc? Trying to gauge whether NFS support is something that needs to be pursued or not.
You have a script that covers 99% of the users. As one contributor has already said, you can't please everyone. I say it is up to you.

NFS is not dead. It has its shortcomings, but so does SMB. In a high latency environment, NFS kicks SMB to the curve in terms of performance. Particularly if you are transferring large amounts of small files. NFS4 has introduced ID mapping and a means of user authentication (via the use of kerberos). Unfortunately our routers do not support NFS4 nor do most home networks
have kerberos setup.

Each to their own. I am set in my ways in certain things as well. For those that want to use NFS, it is easy enough to manually edit your script.
 
Or, a suggestion, have an option to leave the mounting of the network locations up to the user to handle outside of your script. NFS shares can be setup to auto mount via fstab.add script. I know I usually mount my smb share on a permanent (for me, it makes updating github easier).
 
Or, a suggestion, have an option to leave the mounting of the network locations up to the user to handle outside of your script. NFS shares can be setup to auto mount via fstab.add script. I know I usually mount my smb share on a permanent (for me, it makes updating github easier).
@Viktor Jaep , @Jeffrey Young makes a good point. Maybe an option to allow the Target to be an already mounted filesystem. That way it can be anything, even another USB attached drive.

I too was surprised by statements that NFS is dead/dying. My observation a few years ago when I was still working was that NFS dominates Enterprise/Data Centers, SMB dominates desktops. Heavy Linux = NFS, Heavy Windows = SMB.
 
I too was surprised by statements that NFS is dead/dying. My observation a few years ago when I was still working was that NFS dominates Enterprise/Data Centers, SMB dominates desktops. Heavy Linux = NFS, Heavy Windows = SMB.
I certainly did not want to imply that NFS is on its way out. Just not as popular anymore. That said, yeah, for a data centre, or any other high latency network, NFS is way more efficient than SMB.
 
I certainly did not want to imply that NFS is on its way out. Just not as popular anymore. That said, yeah, for a data centre, or any other high latency network, NFS is way more efficient than SMB.
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
 
You guys get no breaks!! :p

What's new!?
v1.28b1 - (TBA)
- 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.
- 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:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.28b1.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"

View attachment 53831

Enjoy!
@XxUnkn0wnxX... this one's for you!
 

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