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!

I nuked everything - S.O.P
Like I said I started from scratch.
It's working now, but I'll really like to test again under the original conditions. If I have any more problems I'll come back.
 
I nuked everything - S.O.P
Like I said I started from scratch.
It's working now, but I'll really like to test again under the original conditions. If I have any more problems I'll come back.
My misunderstanding. I read it as downloaded script, then nuked USB. Then tried opkg. Which would not work.
 
I nuked everything - S.O.P
Like I said I started from scratch.
It's working now, but I'll really like to test again under the original conditions. If I have any more problems I'll come back.
Thank you for participating in the testing process @Ripshod. Let us know if you have success!
 
SUCCESS!!
Everything running smoothly now, and my first backup done. You can understand (after rebuilding my scripts) I'm hesitant to try the restore. I presume that's already been tested.
Just one miniscule problem - "(or simply just execute 'backupmon')" doesn't work.
Well done to everyone involved :cool:

And thanks all for your patience ;)
 
SUCCESS!!
Everything running smoothly now, and my first backup done. You can understand (after rebuilding my scripts) I'm hesitant to try the restore. I presume that's already been tested.
I nuked everything on my test RT-AC86U and restored... everything was successful, and continues to run just fine! Let's hope you never have to use it, but know you have a good way of getting this environment back in case of a corrupt entware installation, or some other USB reliability issue.

Just one miniscule problem - "(or simply just execute 'backupmon')" doesn't work.
The backupmon.sh gets added as an alias to the profile.add file... sometimes it take a little while for it to start working... I haven't quite figured out what makes this tick... but after logging in/out on SSH a few times seems to do the trick... then you can call "backupmon" or "backupmon -setup". I still play it safe and prefer to use the long method when calling the script in other types of commands, like with cru... and go the route: "sh /jffs/scripts/backupmon.sh"

Well done to everyone involved :cool:

And thanks all for your patience ;)
Absolutely... enjoy sleeping better at night! LOL :)
 
@Viktor Jaep - After unmounting with "umount -l", my router's been running for eight hours so far - not really long enough to be sure, but looking good.

Something I thought - if the umount does fail, your script doesn't catch it.
The last few lines of output are as follows

Code:
STATUS: Finished copying BUexclusions script to /tmp/mnt/NAS/public/BACKUPS/Routers/SCHED_BU/AX86U.
STATUS: Finished copying restore instructions.txt to /tmp/mnt/NAS/public/BACKUPS/Routers/SCHED_BU/AX86U.
umount: can't unmount /tmp/mnt/NAS/public: Device or resource busy
STATUS: External Drive (\\192.168.1.22\public) unmounted successfully.

I assume you can catch the error msg from umount? (I'm not familiar with shell scripts).
If so, it would be really useful to have the error written to syslog.
 
@Viktor Jaep - After unmounting with "umount -l", my router's been running for eight hours so far - not really long enough to be sure, but looking good.

Something I thought - if the umount does fail, your script doesn't catch it.
The last few lines of output are as follows

Code:
STATUS: Finished copying BUexclusions script to /tmp/mnt/NAS/public/BACKUPS/Routers/SCHED_BU/AX86U.
STATUS: Finished copying restore instructions.txt to /tmp/mnt/NAS/public/BACKUPS/Routers/SCHED_BU/AX86U.
umount: can't unmount /tmp/mnt/NAS/public: Device or resource busy
STATUS: External Drive (\\192.168.1.22\public) unmounted successfully.

I assume you can catch the error msg from umount? (I'm not familiar with shell scripts).
If so, it would be really useful to have the error written to syslog.
Yeah, that's a lazy error on my part... I'm not catching the return codes from a successful or unsuccessful mount/umount. Let me see what I can do to shore this up... in fact, I could probably throw it in a loop, and have it wait 10 seconds before trying again.
 
I nuked everything on my test RT-AC86U and restored... everything was successful
Indeed it does work just fine - tested 😄

sometimes it take a little while for it to start working
It appears after a certain amount of time. I didn't login/logout multiple times, I just left it an hour.
 
Just released v0.7 RC ... let's see how this goes! :) Added some logic to check for mount/umount failures (thanks to @alan6854321's suggestion), and will keep retrying for 2 minutes. Let me know how this works for you, for those who were seeing unmount issues?

What's new?
v0.7RC - (September 7, 2023)
- FIXED:
Added logic to watch for mount/umount failures, and will keep trying to mount or dismount for up to 2 minutes before giving up due to a failure. The error will be written to the syslog.

Download link (or update directly within BACKUPMON under the setup menu):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-0.7.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh
 
Dumb question....so if I used BACKUPMON to create a backup from a perfectly working USB drive, once created and I decide to update my USB to a new SDD (once properly formatted), am I able to restore the backup (from the working USB) to the new SSD?

Any recommended steps on how to backup and restore?

Thanks!
 
Dumb question....so if I used BACKUPMON to create a backup from a perfectly working USB drive, once created and I decide to update my USB to a new SDD (once properly formatted), am I able to restore the backup (from the working USB) to the new SSD?

Thanks!
Yes! Absolutely! Just make sure you label the new SSD with the same name you had on your former USB drive. Restore, reboot and you're back in business!
 
Let me know how this works for you, for those who were seeing unmount issues?
0.7 seems to be fine here on RT-AX86U with the share mapped on my old faithful Synology NAS, unmount went through first time with no errors, after the “settling”.
 
0.7 seems to be fine here on RT-AX86U with the share mapped on my old faithful Synology NAS, unmount went through first time with no errors, after the “settling”.
Thanks for the report, @Stephen Harrington! I'll get working on the multiple backups/day suggestion next!
 
Awesome script, I have a minor request if possible, under the setup utility screen, under operations, are you able to add a manual backup and maybe a restore operation shortcut?

sc: Setup & Configure
up: Check for updates
un: Uninstall

Possiby add:

bu: "Backup" or "Manual backup"

Thanks again for this!!!
 

Attachments

  • backupmon.png
    backupmon.png
    81.3 KB · Views: 21
Awesome script, I have a minor request if possible, under the setup utility screen, under operations, are you able to add a manual backup and maybe a restore operation shortcut?

sc: Setup & Configure
up: Check for updates
un: Uninstall

Possiby add:

bu: "Backup" or "Manual backup"

Thanks again for this!!!
Definitely possible. I'll get this added, along with the restore. You can also accomplish a manual backup by just running:

Code:
backupmon

-or-

backupmon -backup
 
Definitely possible. I'll get this added, along with the restore. You can also accomplish a manual backup by just running:

Code:
backupmon

-or-

backupmon -backup
Thanks again.

Are you enabling AiDisk thru the router GUI to access the USB local network. If not, can you teach a noob on how you guys are enabling the network. I guess mainly how you're accessing options 1-5 thru the local network.

Thanks again and I apologize all the newbie questions!!!
 
Thanks again.

Are you enabling AiDisk thru the router GUI to access the USB local network. If not, can you teach a noob on how you guys are enabling the network. I guess mainly how you're accessing options 1-5 thru the local network.

Thanks again and I apologize all the newbie questions!!!
The share is done via the Linux mount command. You can look at my script at the below link. It is a little more cleaned up a shorter. For a novice, maybe a little easier to follow.

 
Thanks again.

Are you enabling AiDisk thru the router GUI to access the USB local network. If not, can you teach a noob on how you guys are enabling the network. I guess mainly how you're accessing options 1-5 thru the local network.

Thanks again and I apologize all the newbie questions!!!
Are you talking about how to create a network share? I've created a share on a local Windows server, but you can virtually create one off pretty much anything. ;)
 
Nothing like testing in production! Accidentally restored full JFFS and USB backups back from September 6 to my PRODUCTION SYSTEM before I realized I didn't comment out the TAR statements... Argh... but no harm done! Everything actually continued to keep working without a freaking hiccup! Amazing. :) New v0.8RC released with some feature requests from @Stephen Harrington and @Kingp1n!

What's New?!
v0.8RC - (September 8, 2023)
- ADDED:
Major new functionality to choose between the mode of BACKUPMON: Basic or Advanced. Here is the difference between this functionality (formally called, @Stephen Harrington Mode) <tongue-in-cheek> :p :

BASIC
- Only backs up one backup set per daily folder
- Backup file names have standard names based on jffs and USB drive label names
- Self-prunes the daily backup folders by deleting contents before backing up new set
- Will overwrite daily backups, even if multiple are made on the same day
- Restore more automated, and only required to pick which day to restore from

ADVANCED
- Backs up multiple daily backup sets per daily folder
- Backup file names contain extra unique date and time identifiers
- Keeps all daily backups forever, and no longer self-prunes
- Will not overwrite daily backups, even if multiple are made on the same day
- Restore more tedious, and required to type exact backup file names before restore

Please note, that during a restore in advanced mode, you will be able to see the files under the directories you specify, but you will be required to enter in the EXACT full filename of the JFFS and USB backup filenames you wish to have restored.

- ADDED: New menu items under the setup menu, allow you to launch a backup or restore. Thanks to @Kingp1n for the suggestion!

Download Links (or update directly within the BACKUPMON setup menu!)
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-0.8.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"

Significant Screenshots:
New setup menu items to allow you to backup/restore - thanks @Kingp1n for the suggestion!
1694227490816.png


New Basic vs Advanced config menu items -- thanks @Stephen Harrington for the suggestion!
1694227527435.png


During a restore, running in advanced mode, you will be presented with much more detail, requiring you to type in the EXACT filenames of the jffs/usb backups you wish to restore... welcome to advanced mode, ladies & gentlemen!
1694227694081.png

1694227826869.png
 
Last edited:

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