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!

Well I've just done multiple reformats in case a cell is dying and restored from 30th.
There is, and was, plenty of space on the jffs partition. Right now even with all the scripts I run it's only used 4.3 of 63MB. Memory is one thing I deliberately check before a reset and all was fine, ever since something ate up all my usb disc.
One thing I did notice (@Viktor Jaep) is the primary backup ran long enough to complete 1.1MB (normally 1.8 zipped) of the jffs partition before it failed. SSD and NVRAM backups never started, and neither did the secondary backup.
 
Last edited:
Well I've just done multiple reformats in case a cell is dying and restored from 30th.
There is, and was, plenty of space on the jffs partition. Right now even with all the scripts I run it's only used 4.3 of 63MB. Memory is one thing I deliberately check before a reset and all was fine, ever since something ate up all my usb disc.
One thing I did notice (@Viktor Jaep) is the primary backup ran long enough to complete 1.1MB (normally 1.8 zipped) of the jffs partition before it failed. SSD and NVRAM backups never started, and neither did the secondary backup.

Sounds like the backup bombed out and stopped the script as designed. Let's hope the jffs reformat helps! Please let us know if you have better success after this.
 
New version released today adding tar.gz integrity checks after BACKUPMON creates backups for the JFFS and EXT USB drive! Can't have too many validation checks to make sure your backup file integrity is OK after writing to the target location.

What's new?
v1.46 - (January 31, 2024)
- ADDED:
File integrity checks for the tar.gz files created containing JFFS and Ext USB Drive data. After creation of these files, an integrity check executes to ensure that the file is intact before moving on to the next step. If it returns an integrity error, the script will force an exit with an error message/code. While it would probably be pretty rare that tar.gz files actually fail to get created, but even if they were successfully created and still fail an integrity check, there could be bigger problems going on with the network, hardware or disk issues. Keep an eye on those logs!
- ADDED: Many thanks to @Martinski for adding a great function that will help determine the EXT USB Drive label, and will return null if one isn't set. It's actually been quite a hurdle to determine what's plugged into the back of your router with the different variations things can take within the OS. Your help and expertise is truly appreciated! :)

Download Link (Or update directly from AMTM or BACKUPMON itself):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.46.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"

Significant screenshots:

As shown below, file integrity checks happen after the file is written to the target location
1706753130650.png
 
Looks promising. Will this work on the routers w/o jffs partitions, like TUF GAMING AX4200? Can this be installed on the USB drive and run from there after the reboot?
 
Live others, I have observed that chron job has disappeared. Even after updating and changing backup time settings from W / M / Y, does not add the chron job. Is there anyway to manually add it, or add a script menu to check / reinstall the chron job?

GT-AX11000 on Merlin 3004.388.6
 
Last edited:
Live others, I have observed that chron job has disappeared. Even after updating and changing backup time settings from W / M / Y, does not add the chron job. Is there anyway to manually add it, or add a script menu to check / reinstall the chron job?

GT-AX11000 on Merlin 3004.388.6
The cron should be added back after a reboot, or by saving settings from within BACKUPMON.
The reboot would be preferred as the router is in an "unknown" condition (who knows what else is wrong?).
 
I have no idea but my BACKUPMON cron job has NOT been impacted, even with version 1.46. As in my signature, I am using an RT-AX88U with Entware, amtm 4.2, CakeQoS 2.2.0, Diversion 5.0, ntpMerlin 3.4.5 and BACKUPMON 1.46 on an USB drive.
 
Looks promising. Will this work on the routers w/o jffs partitions, like TUF GAMING AX4200? Can this be installed on the USB drive and run from there after the reboot?

Sorry, no... it needs a JFFS partition for any basic functionality.
 
Live others, I have observed that chron job has disappeared. Even after updating and changing backup time settings from W / M / Y, does not add the chron job. Is there anyway to manually add it, or add a script menu to check / reinstall the chron job?

GT-AX11000 on Merlin 3004.388.6

Try disabling the scheduler, save your settings, and then re-enable the scheduler... save. You should see a cron job and accompanying services-start statement.
 
Hi All,

Can someone help me. My USB Drive is not backing up at all. Backup file is 0bytes.

Code:
    : Source Router Model                : GT-AX11000                                                                                                                                                                                                                                                                   
    : Source Router Firmware/Build       : 3004.388.6_0                                                                                                                                                                                                                                                                 
 1  : Source EXT USB Drive Mount Point   : /tmp/mnt/mdata_data                                                                                                                                                                                                                                                           
 2  : Backup Target Media Type           : Network                                                                                                                                                                                                                                                                       
 3  : Backup Target Username             : MY USERNAME                                                                                                                                                                                                                                                                     
 4  : Backup Target Password (ENC)       : MY PASSWORD                                                                                                                                                                                                                                 
 5  : Backup Target UNC Path             : \\\\192.168.100.62\\backup\\asus                                                                                                                                                                                                                                             
 6  : Backup Target Mount Point          : /tmp/mnt/backups                                                                                                                                                                                                                                                             
 7  : Backup Target Directory Path       : /router/GT-AX6000-Backup                                                                                                                                                                                                                                                     
 8  : Backup Exclusion File Name         : /jffs/addons/backupmon.d/pfexclusion.txt                                                                                                                                                                                                                                     
 9  : Backup Swap File                   : No                                                                                                                                                                                                                                                                           
 10 : Backup CIFS/SMB Version            : 2.1                                                                                                                                                                                                                                                                           
 11 : Backup Frequency?                  : Monthly                                                                                                                                                                                                                                                                       
 |---  Purge Backups?                    : No                                                                                                                                                                                                                                                                           
 |  -  Purge older than (days):          : N/A                                                                                                                                                                                                                                                                           
 12 : Backup/Restore Mode                : Basic                                                                                                                                                                                                                                                                         
 13 : Schedule Backups?                  : Yes
                                                                                                                                                                                                                                                                         
 |---  Time:                             : 01:00                                                                                                                                                                                                                                                                         
 |---  Scheduled Backup Mode             : Backup Only                                                                                                                                                                                                                                                                   
 14 : Secondary Backup Config Options    : Disabled

The USB Driver have 2 partitions:

Code:
/dev/sda2             30639040   2148544  26911080   7% /tmp/mnt/msata_swap
/dev/sda1             30640048    138752  28921828   0% /tmp/mnt/mdata_data

It is use for Skynet Firewall and some other things.
 
Hi All,

Can someone help me. My USB Drive is not backing up at all. Backup file is 0bytes.

Code:
    : Source Router Model                : GT-AX11000                                                                                                                                                                                                                                                               
    : Source Router Firmware/Build       : 3004.388.6_0                                                                                                                                                                                                                                                             
 1  : Source EXT USB Drive Mount Point   : /tmp/mnt/mdata_data                                                                                                                                                                                                                                                       
 2  : Backup Target Media Type           : Network                                                                                                                                                                                                                                                                   
 3  : Backup Target Username             : MY USERNAME                                                                                                                                                                                                                                                                 
 4  : Backup Target Password (ENC)       : MY PASSWORD                                                                                                                                                                                                                             
 5  : Backup Target UNC Path             : \\\\192.168.100.62\\backup\\asus                                                                                                                                                                                                                                         
 6  : Backup Target Mount Point          : /tmp/mnt/backups                                                                                                                                                                                                                                                         
 7  : Backup Target Directory Path       : /router/GT-AX6000-Backup                                                                                                                                                                                                                                                 
 8  : Backup Exclusion File Name         : /jffs/addons/backupmon.d/pfexclusion.txt                                                                                                                                                                                                                                 
 9  : Backup Swap File                   : No                                                                                                                                                                                                                                                                       
 10 : Backup CIFS/SMB Version            : 2.1                                                                                                                                                                                                                                                                       
 11 : Backup Frequency?                  : Monthly                                                                                                                                                                                                                                                                   
 |---  Purge Backups?                    : No                                                                                                                                                                                                                                                                       
 |  -  Purge older than (days):          : N/A                                                                                                                                                                                                                                                                       
 12 : Backup/Restore Mode                : Basic                                                                                                                                                                                                                                                                     
 13 : Schedule Backups?                  : Yes
                                                                                                                                                                                                                                                                     
 |---  Time:                             : 01:00                                                                                                                                                                                                                                                                     
 |---  Scheduled Backup Mode             : Backup Only                                                                                                                                                                                                                                                               
 14 : Secondary Backup Config Options    : Disabled

The USB Driver have 2 partitions:

Code:
/dev/sda2             30639040   2148544  26911080   7% /tmp/mnt/msata_swap
/dev/sda1             30640048    138752  28921828   0% /tmp/mnt/mdata_data

It is use for Skynet Firewall and some other things.
Have you tried using the (ts) Test your Network Backup Target option under the menu? What does it return? You can also try manually mounting and accessing your backup target, see if you can browse, create files, etc?

Code:
modprobe md4 (you may or may not need to run this)

mount -t cifs \\\\192.168.100.62\\backup\\asus /tmp/mnt/backups -o "vers=2.1,username=admin,password=admin"
 
Last edited:
Have you tried using the (ts) Test your Network Backup Target option under the menu? What does it return? You can also try manually mounting and accessing your backup target, see if you can browse, create files, etc?

Code:
modprobe md4 (you may or may not need to run this)

mount -t cifs \\\\192.168.100.62\\backup\\asus /tmp/mnt/backups -o "vers=2.1,username=admin,password=admin"
Maybe my question was not clear. Everything is backing up correct except my USB Drive.

Synology:
Screenshot 2024-02-03 at 10.32.06.png


mounted location on router:
Screenshot 2024-02-03 at 10.34.30.png


usbdrive.tar.gz is zero bytes
 
Maybe my question was not clear. Everything is backing up correct except my USB Drive.

Synology:
View attachment 56181

mounted location on router:
View attachment 56182

usbdrive.tar.gz is zero bytes
BACKUPMON only backs up 1 partition. Your sda1 partition on your USB Drive that it was supposed to back up is /tmp/mnt/mdata_data... and it backed that up to mdata_data.tar.gz. I'm not quite sure what "usbdrive.tar.gz" is. Could you please share the BACKUPMON logs of your latest backup? Does it mention anything about a "usbdrive.tar.gz" in it? Does it do this each time it backs up and shows this file in each of your backup folders?
 
Last edited:
BACKUPMON only backs up 1 partition. Your sda1 partition on your USB Drive that it was supposed to get backed up is /tmp/mnt/mdata_data... and it backed that up to mdata_data.tar.gz. I'm not quite sure what "usbdrive.tar.gz" is. Could you please share the BACKUPMON logs of your latest backup? Does it mention anything about a "usbdrive.tar.gz" in it? Does it do this each time it backs up and shows this file in each of your backup folders?

It's solved now. I was focused to much on usbdrive.tar.gz (that was old UBS stick I used) and changed it to a SSD with 2 partitions. I see the mdata_data.tar.gz in the backup folder.
 
It's solved now. I was focused to much on usbdrive.tar.gz (that was old UBS stick I used) and changed it to a SSD with 2 partitions. I see the mdata_data.tar.gz in the backup folder.
Ahhh! WHEW. I was feverishly going through my code to figure out how something like that could be created in addition to the main sda1 backup... LOL :p Glad you're good to go!
 
@Viktor Jaep I'm in the situation right now where the cron job has disappeared. It's still there in /jffs/scripts/services-start. I'll not look at it until the morning so if there's any diagnostics you want me to do?
 
@Viktor Jaep I'm in the situation right now where the cron job has disappeared. It's still there in /jffs/scripts/services-start. I'll not look at it until the morning so if there's any diagnostics you want me to do?

I truly have no earthly idea about this one... could it be that cru is crashing and taking its little database of scheduled jobs with it? I have a mystery instance as well where my backups didn't kick off for about 5 days. I may have rebooted on day 6, there's no telling. May need to bring this behavior up in the main Merlin thread. Are any other cron jobs missing?
 
Are any other cron jobs missing?
I don't know yet. I'm not bothered about missing the morning's backup so I'll do a comparison before and after reboot in the AM. Everything else does seem to be there though.
 
I couldn't sleep on this so here's the before reboot and after (a lot more missing than I first thought)

Before:
Code:
12,27,42,57 * * * * /jffs/scripts/spdmerlin generate #spdMerlin#
30 19 */7 * * service restart_letsencrypt #LetsEncrypt#
0 1-23 * * * /jffs/scripts/uiDivStats generate #uiDivStats_generate#
1 0 * * * /jffs/scripts/uiDivStats trimdb #uiDivStats_trim#
* * * * * /jffs/scripts/uiDivStats querylog #uiDivStats_querylog#
4-59/5 * * * * /jffs/scripts/uiDivStats flushtodb #uiDivStats_flushtodb#
00 2 * * Fri /bin/sh /opt/share/diversion/file/update-bl.div reset #Diversion_UpdateBL#
20 5 * * * /bin/sh /opt/share/diversion/file/rotate-logs.div #Diversion_RotateLogs#
20 17 * * * diversion count_ads count #Diversion_CountAds#
30 1 * * Fri /bin/sh /opt/share/diversion/file/stats.div #Diversion_WeeklyStats#
50 */12 * * * sh /jffs/scripts/firewall debug genstats #Skynet_genstats#
*/10 * * * * /jffs/scripts/YazFi check #YazFi#

After:

Code:
45 */6 * * * /jffs/addons/amtm/routerdate cron #amtm_RouterDate#
10 7 * * Sun /bin/sh /jffs/addons/amtm/sc_update.mod -run #amtm_ScriptsUpdateNotification#
15 1 * * * sh /jffs/scripts/backupmon.sh -backup #RunBackupMon#
*/10 * * * * /jffs/scripts/YazFi check #YazFi#
5 0 * * * /opt/sbin/logrotate /opt/etc/logrotate.conf >> /opt/tmp/logrotate.daily 2>&1 #logrotate#
*/10 * * * * /jffs/scripts/ntpmerlin generate #ntpMerlin#
25 8 * * * sh /jffs/scripts/firewall banmalware #Skynet_banmalware#
4 1 * * Mon sh /jffs/scripts/firewall update #Skynet_autoupdate#
0 * * * * sh /jffs/scripts/firewall save #Skynet_save#
12,27,42,57 * * * * /jffs/scripts/spdmerlin generate #spdMerlin#
57 9 */7 * * service restart_letsencrypt #LetsEncrypt#
0 1-23 * * * /jffs/scripts/uiDivStats generate #uiDivStats_generate#
1 0 * * * /jffs/scripts/uiDivStats trimdb #uiDivStats_trim#
* * * * * /jffs/scripts/uiDivStats querylog #uiDivStats_querylog#
4-59/5 * * * * /jffs/scripts/uiDivStats flushtodb #uiDivStats_flushtodb#
00 2 * * Fri /bin/sh /opt/share/diversion/file/update-bl.div reset #Diversion_UpdateBL#
20 5 * * * /bin/sh /opt/share/diversion/file/rotate-logs.div #Diversion_RotateLogs#
20 17 * * * diversion count_ads count #Diversion_CountAds#
30 1 * * Fri /bin/sh /opt/share/diversion/file/stats.div #Diversion_WeeklyStats#
45 */12 * * * sh /jffs/scripts/firewall debug genstats #Skynet_genstats#

So that's
Code:
amtm_RouterDate
amtm_ScriptsUpdateNotification
RunBackupMon
logrotate
ntpMerlin
Skynet_banmalware
Skynet_autoupdate
Skynet_save
All disappeared. I can't find any commonality _ RunBackupMon is the only one in services-start.

EDIT: Added this to the AMTM thread.
 
Last edited:

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top