Quoc Huynh
Regular Contributor
Thank you so much @Viktor Jaep
He stuck with it, even through our epic openssl journeys. One line at a time. He deserves a beer or two. They will sing songs about his many Triumphs over in the the legendary "Backup/Restore your Router: JFFS + NVRAM + External USB Drive!" forum thread!Thank you so much @Viktor Jaep
No no... the beer is on me, kind sir! Your skills are amaze!He stuck with it, even through our epic openssl journeys. One line at a time. He deserves a beer or two. The will sing songs about his many Triumphs over in the the legendary "Backup/Restore your Router: JFFS + NVRAM + External USB Drive!" forum thread!
Bring on the beta!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!
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...
mount -t nfs 10.0.100.90:/Backups /tmp/mnt/primary -o "nfsvers=3,nolock,_netdev,rsize=8192,wsize=8192"
modprobe nfs nfsv3
[ $(pidof mountd) ] || /usr/sbin/mountd -N 2
mountd
if NFS is not turned on in the Server Centre part of the GUI.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."reject root" is a bit misleading IMHO. If the client is root andAlso note, that since the router will be "signing in" as root, you will need to keep theno_root_squash
option on you NAS. Otherwise, your NAS will reject root.
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."reject root" is a bit misleading IMHO. If the client is root andno_root_squash
is in effect the client can create files with root ownership (assuming the directory permissions allow it). Ifroot_squash
is in effect then those files would be created with an ownership ofnobody/nogroup
.
UUID can be preserved if you do a full clone of the drive that preserves the partition tables (block level cloning, DD Command).If you use UUID would you still be able to restore to a new (or reformatted) usb ssd?
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.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.UUID can be preserved if you do a full clone of the drive that preserves the partition tables (block level cloning, DD Command).
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"
@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.Yeah, I was trying to keep it simple. NFS is, seemingly, a bit of a dying thing. But, I agree with your statement.
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.@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.
@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.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).
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 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.
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! LOLI 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.
@XxUnkn0wnxX... this one's for you!You guys get no breaks!!
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!
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!