What's new

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

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

One other request. @smarthome-enthusiast ... with your NFS drive still mounted... could you please share your mount statement results to see what it looks like?
 
@Viktor Jaep - quick question. Does BACKUPMON do anything with nvram?
More - does it do any nvram set commands?

Im planing on doing some testing with @Martinski SaveRestoreNVRAM script.
 
@Viktor Jaep - quick question. Does BACKUPMON do anything with nvram?
More - does it do any nvram set commands?

Im planing on doing some testing with @Martinski SaveRestoreNVRAM script.
It doesn't do any "nvram set" commands... just exports and imports the NVRAM in its entirety for backup/restore purposes.
 
Thanks, I read through the code and saw the nvram restore command.
 
One other request. @smarthome-enthusiast ... with your NFS drive still mounted... could you please share your mount statement results to see what it looks like?
FWIW here's what a mount looks like on my router.
Code:
192.168.1.10:/mnt/share on /tmp/mnt/nfs type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=2049,timeo=70,retrans=3,sec=sys,local_lock=none,addr=192.168.1.10)
 
What version of tar are you using? Is it the busybox v1.25.1 version, or something else? I saw another post where multiple versions of tar were causing this error...

BusyBox v1.25.1 (2024-02-26 21:49:40 EST) multi-call binary

Could there be some empty tar files that it's getting stuck on? Found another article that tar might have problems with backing up other 0 byte tar files.

Just did a quick scan of the files and didn't find any. I can share a recursive list of files in the directory privately if you want to have a look.

To check your drive, do you have the AMTM disk check script enabled? (AMTM->dc) Then after a reboot, it will check your drive, and can use AMTM->dcl to look at the results?

Last time I used the script it didn't work. But I'll try it again now.

I've not been following this thread so apologies if I'm missing something. But that tar command is syntactically incorrect which is why you get that error. I suspect you intended to have a dot at the end of the command:

Code:
tar -zcf /tmp/mnt/backups/Router/ASUSMerlin/RT-AX88U/19/usbdrive-test.tar.gz -C /tmp/mnt/Drive1 .

This worked until I got a "tar: read error: Input/output error". Used the verbose flag and it errored out after "./entware/usr/lib/locale/locale-archive". I don't know if there is an order to how it's compressing the directories, so I wouldn't know what to look for. @Viktor Jaep or @ColinTaylor, again, I can send you the recursive directory list and output of above command if you want to have a go at trying to figure out where it's erroring out?

One other request. @smarthome-enthusiast ... with your NFS drive still mounted... could you please share your mount statement results to see what it looks like?

I would if I know what that is or what command to run 😅 I'm basically a copy paste monke :) I revived an old RPi as an NFS Server to test with so the config is pretty lax. Maybe @ColinTaylor can share the code he run?
 
This worked until I got a "tar: read error: Input/output error". Used the verbose flag and it errored out after "./entware/usr/lib/locale/locale-archive". I don't know if there is an order to how it's compressing the directories, so I wouldn't know what to look for. @Viktor Jaep or @ColinTaylor, again, I can send you the recursive directory list and output of above command if you want to have a go at trying to figure out where it's erroring out?
The issue was not having that '.' behind the tar command I sent you earlier... that seemed to do the trick. Now we're seeing what the error REALLY is. ;)

So to me, an error like this either means one of 2 things: (1) you got some bad blocks/sectors on your EXT USB drive that it can't read and get past, which may be able to be repaired with the AMTM->dc tool... or you might need to take the drive offline, and run an integrity check on it... (2) could be something gone wrong with your entware installation. Easy fix there is to uninstall/reinstall... On the downside, some of your scripts may bomb out unless you go through their setups again should they have installed any special binaries/tools. etc... and if you have a lot of scripts, that will suck.

Another option to consider... format your External Drive, and start over... that's a safe bet, but also a PITA because it will require you reinstalling any custom scripts you're running.

If the community has other input or suggestions, please drop a line!

I would if I know what that is or what command to run 😅 I'm basically a copy paste monke :) I revived an old RPi as an NFS Server to test with so the config is pretty lax. Maybe @ColinTaylor can share the code he run?
All good... @ColinTaylor shared his info - that's what I was looking for. You can get to this info by typing mount from an SSH prompt. :)

Once we get your harddrive working again reliably, I'm pretty confident that backupmon will be able to get a copy of your EXT USB drive copied over your NFS share... based on these initial results, I think it's looking good, and will continue plugging away with getting NFS capabilities working across the other various areas of the script!
 
@smarthome-enthusiast ... if you haven't already enabled the disk check in AMTM... please try that first to see if that fixes your issues. Here's some steps;

1. From an SSH prompt, enter "amtm",
2. Press "i" to show all the scripts
3. Select "dc" for the disk checker script
4. Once installed, reboot your router...
5. When it comes back up, go back into "amtm"
6. Then type "dcl" to see the disk checker log.

If things look good, try another run with backupmon to see if you get any different results when backing up your EXT USB drive! :)
 
I wonder about file permissions? I'm pretty sure NFS has it's own idea about file access. SMB might be easier. Not sure.
Again, maybe @ColinTaylor or someone else more familiar with NFS can opine
 
I wonder about file permissions? I'm pretty sure NFS has it's own idea about file access. SMB might be easier. Not sure.
Again, maybe @ColinTaylor or someone else more familiar with NFS can opine

The thing is... it's possible. Yes, a lot of work needs to be done server-side. That has been my hesitation as well. But once it's configured, it works... check out the progress that @smarthome-enthusiast has made on this above!
 
I wonder about file permissions?
In what sense? From my brief scan of the posts above I'd assumed that the point was that the user had already successfully mounted the NFS drive by other means, and therefore the permissions were already correct. The backup script was using this local mountpoint rather than mounting it itself.
 
I was more thinking along the lines of file permissions. The log showed it failing at or around a file. Just wondering.
 
I was more thinking along the lines of file permissions. The log showed it failing at or around a file. Just wondering.
That's a local failure on the router side...
 
@smarthome-enthusiast ... if you haven't already enabled the disk check in AMTM... please try that first to see if that fixes your issues.

@Viktor Jaep You were right. "dcl" shows:

Code:
disk_check.log has this content:

 START FILE
_____________________________________________


 Tue Mar 19 22:53:21 GMT 2024 Waited 3s for NTP to sync date
 Tue Mar 19 22:53:21 GMT 2024 Probing 'ext4' on device /dev/sda1
 Running disk check with command 'e2fsck -p' on /dev/sda1
 Drive1 contains a file system with errors, check forced.
 Error reading block 409 (Input/output error).

 Entware: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
     (i.e., without -a or -p options)
 Tue Mar 19 22:53:22 GMT 2024 Disk check done on /dev/sda1
_____________________________________________

 END FILE
_____________________________________________

Tried running "e2fsck" but it's in use. Does anyone know if I can unmount the Entware drive while router is on and run "e2fsck"? Might pull the drive and run it on a Linux VM. If that fails, I'll have to get a new one and start over.
 
@Viktor Jaep You were right. "dcl" shows:

Code:
disk_check.log has this content:

 START FILE
_____________________________________________


 Tue Mar 19 22:53:21 GMT 2024 Waited 3s for NTP to sync date
 Tue Mar 19 22:53:21 GMT 2024 Probing 'ext4' on device /dev/sda1
 Running disk check with command 'e2fsck -p' on /dev/sda1
 Drive1 contains a file system with errors, check forced.
 Error reading block 409 (Input/output error).

 Entware: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
     (i.e., without -a or -p options)
 Tue Mar 19 22:53:22 GMT 2024 Disk check done on /dev/sda1
_____________________________________________

 END FILE
_____________________________________________

Tried running "e2fsck" but it's in use. Does anyone know if I can unmount the Entware drive while router is on and run "e2fsck"? Might pull the drive and run it on a Linux VM. If that fails, I'll have to get a new one and start over.

Have you tried running "fsck"? Also, just curious. What kind of external drive is this? Flashdrive? SSD? HDD?
 
Tried running "e2fsck" but it's in use. Does anyone know if I can unmount the Entware drive while router is on and run "e2fsck"?
Disable JFFS custom scripts and configs in the webUI and reboot the router. You should then be able to unmount the disk in the webUI if it isn't already.
 
Have you tried running "fsck"? Also, just curious. What kind of external drive is this? Flashdrive? SSD? HDD?

It's a Sandisk Ultra Fit Flashdrive until I am able to get a small enough SSD to replace it with.

Disable JFFS custom scripts and configs in the webUI and reboot the router. You should then be able to unmount the disk in the webUI if it isn't already.

Thanks. That worked.

@Viktor Jaep It backed up successfully.

Code:
55 Mar 20 2024 15:58:04 router BACKUPMON[19132] - INFO: Successfully wrote a new config file
56 Mar 20 2024 15:58:11 router BACKUPMON[19132] - INFO: External network drive ( 192.168.XX.XX:/volume/TestNFS ) mounted successfully under:  /tmp/mnt/backups
57 Mar 20 2024 15:58:13 router BACKUPMON[19132] - INFO: Finished backing up JFFS to /tmp/mnt/backups/Router/ASUSMerlin/RT-AX88U/20/jffs.tar.gz
58 Mar 20 2024 15:58:14 router BACKUPMON[19132] - INFO: Finished integrity check for /tmp/mnt/backups/Router/ASUSMerlin/RT-AX88U/20/jffs.tar.gz
59 Mar 20 2024 15:58:16 router BACKUPMON[19132] - INFO: Finished backing up NVRAM to /tmp/mnt/backups/Router/ASUSMerlin/RT-AX88U/20/nvram.cfg
60 Mar 20 2024 15:58:17 router BACKUPMON[19132] - INFO: Finished copying routerfw.txt to /tmp/mnt/backups/Router/ASUSMerlin/RT-AX88U/20/routerfw.txt
61 Mar 20 2024 15:58:18 router BACKUPMON[19132] - INFO: Starting backup of EXT Drive on Wed Mar 20 15:58:18 EAT 2024
62 Mar 20 2024 15:58:29 router BACKUPMON[19132] - INFO: Finished backing up EXT Drive in 11 sec to /tmp/mnt/backups/Router/ASUSMerlin/RT-AX88U/20/system.tar.gz
63 Mar 20 2024 15:58:30 router BACKUPMON[19132] - INFO: Starting integrity check of EXT Drive on Wed Mar 20 15:58:30 EAT 2024
64 Mar 20 2024 15:58:31 router BACKUPMON[19132] - INFO: Finished integrity check for /tmp/mnt/backups/Router/ASUSMerlin/RT-AX88U/20/system.tar.gz
65 Mar 20 2024 15:58:31 router BACKUPMON[19132] - INFO: Finished copying backupmon.sh script to /tmp/mnt/backups/Router/ASUSMerlin/RT-AX88U
66 Mar 20 2024 15:58:31 router BACKUPMON[19132] - INFO: Finished copying backupmon.cfg file to /tmp/mnt/backups/Router/ASUSMerlin/RT-AX88U
67 Mar 20 2024 15:58:31 router BACKUPMON[19132] - INFO: Finished copying pfexclusion.txt file to /tmp/mnt/backups/Router/ASUSMerlin/RT-AX88U
68 Mar 20 2024 15:58:31 router BACKUPMON[19132] - INFO: Finished copying reference nvram.txt extract to /tmp/mnt/backups/Router/ASUSMerlin/RT-AX88U
69 Mar 20 2024 15:58:31 router BACKUPMON[19132] - INFO: Finished copying restoration instructions.txt file to /tmp/mnt/backups/Router/ASUSMerlin/RT-AX88U
70 Mar 20 2024 15:58:41 router BACKUPMON[19132] - INFO: External network drive ( 192.168.XX.XX:/volume/TestNFS ) unmounted successfully.
71 Mar 20 2024 15:58:46 router BACKUPMON[19132] - INFO: Email notification was sent successfully [SUCCESS: Primary Backup completed successfully].
 
It's a Sandisk Ultra Fit Flashdrive until I am able to get a small enough SSD to replace it with.

@Viktor Jaep It backed up successfully

AWESOME! ;)

Yeah, typically once a flashdrive starts exhibiting errors like that, it's already in a downward spiral. Best to stick with an SSD! Sounds like you're on the right path. Stand by for further NFS enhancements to the rest of backupmon! ;)
 

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!

Members online

Top