Viktor Jaep
Part of the Furniture
BACKUPMON v1.5.10
Released March 1, 2024
**PLEASE TAKE NOTE**
This thread has closed due to it being over 6 months old <sigh> I know. It sucks.
Please jump on this new thread (for the next 6 months):
www.snbforums.com
------------------------------------------------------------------------------
First off -- HUGE thanks to @Jeffrey Young for sharing his original backup script. His script is the main engine of BACKUPMON, and all credit goes to him! BACKUPMON is simply a wrapper around Jeff's backup script functionality, adding easy-to-use menus, more status feedback, and the ability to launch a restore based on your previous backups. Also, big thanks to @Martinski for his many contributions as well as his extremely helpful AMTM email library script, and huge props to @visortgw for contributing to the backup methodologies thread with his scripts and wisdom!
Executive Summary: BACKUPMON is a shell script that provides backup and restore capabilities for your Asus-Merlin firmware router's JFFS, NVRAM and external USB drive environments. By creating a network share off a NAS, server, or other device, BACKUPMON can point to this location, and perform a daily backup to this mounted drive. To perform daily, unattended backups, simply add a statement to your cron schedule, and launch backupmon.sh at any time you wish. During a situation of need to restore a backup after a catastrophic event with either your router or attached USB storage, simply copy the backupmon.sh & .cfg files over to a newly formatted /jffs/scripts folder, ensuring that your external USB storage was formatted with the same exact name (which is retrievable from the instructions.txt in your backup folder), and perform the restore by running the "backupmon.sh -restore" command, selecting the backup you want to use, and going through the prompts to complete the restoration of both your JFFS, NVRAM and external USB drive environments.
Use-case: BACKUPMON was designed to backup from, and restore to an already configured router from an external network resource, given a situation of a corrupted USB drive, botched Entware environment, or other general corruption issues. It can, however, also restore you back to a previous state if you decide to completely wipe your router or external drive from scratch. You can use it to move from one external USB drive to another... say, upgrading from a flashdrive to an SSD! You could also use it to restore your environment to a similar router if your old one dies, and you pick up the same model + firmware level as a replacement.
Here are a couple of different network/USB backup scenarios that it is able to handle (as of v1.35):
Router USB Drive -> External Network Device/Share (on your local network)
Router USB Drive -> Local Router Network Share (could be mounted to a secondary partition on your USB Drive, or secondary USB Drive)
Router USB Drive -> Secondary Router USB Drive (plugged into the secondary USB port)
Router USB Drive -> Router USB Drive (backing up to itself into a separate folder... of course, not recommended, but possible)
Router USB Drive Partition 1 -> Router USB Drive Partition 2 (kinda like the one above, but gives it a little more separation)
NOTE: If you do go down the path of backing your USB drive to your USB drive, it's possible, but not recommended. If you accept this risk, you want to also make sure you exclude your backup folder name in the exclusion file, so you don't back up your backup folder, which will lead to exponential growth of your backup files. The safest way still is to store backups is far away from the device being backed up... so use at your own risk.
What it should NOT be used for: It is not meant to restore backups from one particular model of router (ex: RT-AC86U), to a different shiny new model (ex: GT-AX6000) that you just picked up. In this case, it's still best to set your new router up from scratch, and selectively import any critical files manually from your .TAR backups to your new router if needed. Also, please do not restore your settings/backups from an older firmware to a newer firmware. Your router's CFG (settings) file is meant for the current firmware you're on, so if you do restore, make sure it's still on the same firmware as before.
Requirements:
BACKUPMON is free to use under the GNU General Public License version 3 (GPL 3.0).
This project is hosted on GitHub
Latest release notes updated here
Changelog here | What's new: Exclusion file guidance, AMTM Email Notifications, tar.gz Integrity Checks, Integration with MerlinAU!, Swap File Exclusion, Multiple SMB Protocol Support, Dedicated Log File, USB Backup Options/BW Mode, Base64 Pwd Encoding & More!, Added to AMTM!, EXT USB optional, Secondary Backups + Connection Tester, Auto Purge, Timer bypass, Forced Reboot/Source-Target Checks, NVRAM backup/restore!, NVRAM Extract, Go Live!, Perpetual Backup Purging, Perpetual Frequency added, Basic vs Advanced Backup Modes, Scheduled backups & Weekly/Monthly/Yearly Frequencies!, Release Candidate!
Screenshots:
In normal backup mode, a backup will launch after 10 seconds, giving you a chance to enter setup mode, or restore mode. Normally, you would be running this command from an automated CRON job, to back up your environment unattended each day.
In a normal backup scenario, you will get STATUS feedback after each major item is completed. TAR status messages are left on to help you with any troubleshooting should something not work right, or be locked.
In a restore scenario (by executing 'backupmon.sh -restore" or hitting the X key within 10 seconds of a backup, you are presented with a list of information to successfully accomplish a restore.
Released March 1, 2024
**PLEASE TAKE NOTE**
This thread has closed due to it being over 6 months old <sigh> I know. It sucks.
![www.snbforums.com](https://www.snbforums.com/data/assets/logo/snb_new_round.jpg)
BACKUPMON - BACKUPMON v1.8.19 -July 20, 2024- Backup/Restore your Router: JFFS + NVRAM + External USB Drive! CIFS/SMB/NFS! (Now available in AMTM!)
BACKUPMON v1.8.19 Released July 20, 2024 First off -- HUGE thanks to @Jeffrey Young for sharing his original backup script. His script is the main engine of BACKUPMON, and all credit goes to him! BACKUPMON is simply a wrapper around Jeff's backup script functionality, adding easy-to-use menus...
![www.snbforums.com](https://www.snbforums.com/styles/default/images/favicon-196x196.png)
------------------------------------------------------------------------------
First off -- HUGE thanks to @Jeffrey Young for sharing his original backup script. His script is the main engine of BACKUPMON, and all credit goes to him! BACKUPMON is simply a wrapper around Jeff's backup script functionality, adding easy-to-use menus, more status feedback, and the ability to launch a restore based on your previous backups. Also, big thanks to @Martinski for his many contributions as well as his extremely helpful AMTM email library script, and huge props to @visortgw for contributing to the backup methodologies thread with his scripts and wisdom!
Executive Summary: BACKUPMON is a shell script that provides backup and restore capabilities for your Asus-Merlin firmware router's JFFS, NVRAM and external USB drive environments. By creating a network share off a NAS, server, or other device, BACKUPMON can point to this location, and perform a daily backup to this mounted drive. To perform daily, unattended backups, simply add a statement to your cron schedule, and launch backupmon.sh at any time you wish. During a situation of need to restore a backup after a catastrophic event with either your router or attached USB storage, simply copy the backupmon.sh & .cfg files over to a newly formatted /jffs/scripts folder, ensuring that your external USB storage was formatted with the same exact name (which is retrievable from the instructions.txt in your backup folder), and perform the restore by running the "backupmon.sh -restore" command, selecting the backup you want to use, and going through the prompts to complete the restoration of both your JFFS, NVRAM and external USB drive environments.
Use-case: BACKUPMON was designed to backup from, and restore to an already configured router from an external network resource, given a situation of a corrupted USB drive, botched Entware environment, or other general corruption issues. It can, however, also restore you back to a previous state if you decide to completely wipe your router or external drive from scratch. You can use it to move from one external USB drive to another... say, upgrading from a flashdrive to an SSD! You could also use it to restore your environment to a similar router if your old one dies, and you pick up the same model + firmware level as a replacement.
Here are a couple of different network/USB backup scenarios that it is able to handle (as of v1.35):
Router USB Drive -> External Network Device/Share (on your local network)
Router USB Drive -> Local Router Network Share (could be mounted to a secondary partition on your USB Drive, or secondary USB Drive)
Router USB Drive -> Secondary Router USB Drive (plugged into the secondary USB port)
Router USB Drive -> Router USB Drive (backing up to itself into a separate folder... of course, not recommended, but possible)
Router USB Drive Partition 1 -> Router USB Drive Partition 2 (kinda like the one above, but gives it a little more separation)
NOTE: If you do go down the path of backing your USB drive to your USB drive, it's possible, but not recommended. If you accept this risk, you want to also make sure you exclude your backup folder name in the exclusion file, so you don't back up your backup folder, which will lead to exponential growth of your backup files. The safest way still is to store backups is far away from the device being backed up... so use at your own risk.
What it should NOT be used for: It is not meant to restore backups from one particular model of router (ex: RT-AC86U), to a different shiny new model (ex: GT-AX6000) that you just picked up. In this case, it's still best to set your new router up from scratch, and selectively import any critical files manually from your .TAR backups to your new router if needed. Also, please do not restore your settings/backups from an older firmware to a newer firmware. Your router's CFG (settings) file is meant for the current firmware you're on, so if you do restore, make sure it's still on the same firmware as before.
Requirements:
- This script will allow you to back up one partition of your choice. You are no longer limited to sda1.
- Your Network Backup Target must be able to speak the CIFS/SMB protocol, as that is the method currently used to back up your files across the network. CIFS (Common Internet File System) is a dialect of the SMB (Server Message Block) protocol, and is a very broad standard supported by Windows, Linux and Apple devices. I am looking into supporting NFS as well in the very near future.
- You now have the option to backup from USB1 to USB2, or USB to itself... though not recommended.
- Your External USB should have a valid drive label. Having a blank label may create issues backing up or restoring.
BACKUPMON is free to use under the GNU General Public License version 3 (GPL 3.0).
This project is hosted on GitHub
Latest release notes updated here
Changelog here | What's new: Exclusion file guidance, AMTM Email Notifications, tar.gz Integrity Checks, Integration with MerlinAU!, Swap File Exclusion, Multiple SMB Protocol Support, Dedicated Log File, USB Backup Options/BW Mode, Base64 Pwd Encoding & More!, Added to AMTM!, EXT USB optional, Secondary Backups + Connection Tester, Auto Purge, Timer bypass, Forced Reboot/Source-Target Checks, NVRAM backup/restore!, NVRAM Extract, Go Live!, Perpetual Backup Purging, Perpetual Frequency added, Basic vs Advanced Backup Modes, Scheduled backups & Weekly/Monthly/Yearly Frequencies!, Release Candidate!
Screenshots:
In normal backup mode, a backup will launch after 10 seconds, giving you a chance to enter setup mode, or restore mode. Normally, you would be running this command from an automated CRON job, to back up your environment unattended each day.
In a normal backup scenario, you will get STATUS feedback after each major item is completed. TAR status messages are left on to help you with any troubleshooting should something not work right, or be locked.
In a restore scenario (by executing 'backupmon.sh -restore" or hitting the X key within 10 seconds of a backup, you are presented with a list of information to successfully accomplish a restore.
How is this script supposed to run?
In a normal, daily mode, this script would run from a CRON job, in order to back router completely on a daily basis. Instructions:- Download and install directly using your favorite SSH tools, copy & paste this command (or update from within BACKUPMON):
.Code:curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
- Configure it using this command:
Code:sh /jffs/scripts/backupmon.sh -setup
- Run a backup manually in an SSH window with this command:
Code:sh /jffs/scripts/backupmon.sh -backup (or simply just execute 'backupmon')
- Run a restore manually in an SSH window with this command (or hit the X button with 10 seconds of a backup starting):
Code:sh /jffs/scripts/backupmon.sh -restore
- To make things easier, you can now just type the script name itself (without the path/extension), like so:
Code:backupmon
Last edited: