It will auto purge and keep log size at 5000 rows for now. Should be plentiful, and won't take up much space.Might you consider adding a "Purge logs" option ("pl")? The log could grow to be rather large over time.
Yep, it will contain all folders backups that have been purged as well.I've got my fingers crossed here but wouldn't this log contain the purge info anyway?
This looks nice! Great work @Viktor JaepLooking at turning this around relatively quickly... added some logging capabilities!
What's new?
v1.36b2 - (TBA)
- ADDED: By popular demand, BACKUPMON now features a dedicated log file, located under /jffs/addons/backupmon.d/backupmon.log. You can access this log by hitting "vl" from the setup and operations menu, and will use the NANO text editor to open the log. Exit NANO using CTRL-X. All major events that you would see on-screen are displayed in the log. Certain major items continue to be displayed in the main SYSLOG just incase people are utilizing these someway. I will continue pruning, adding and correcting items as needed.
- FIXED: Thanks to @Ripshod, found an invalid reference where the secondary backups were referring to the primary exclusion list file for weekly backups. Corrected the issue.
Download link:
Code:curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.36b2.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
Significant Screenshots:
View attachment 54135
View attachment 54136
Goes by directory creation date... so yeah, you definitely want to move any baselines out of that area!Quick question. Does the backup purge work off the directory name or the date it was created? I have a "baseline" backup I'd like to keep, so can I rename it or do I have to move it?
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.37.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
Sorry... The default is actually nothing... blank. It should have said "Example: /jffs/addons/backupmon.d/exclusions.txt" -- If you want to use an exclusion file, you must create the file and can put it anywhere, as long as your path referencing it is correct. The contents of the file should just be a list of files/folders that you want to exclude from the backup.I'm confused about the option to set the exclusion list. Selecting option 8 says the default is /jffs/addons/backupmon.d/exclusions.txt. I'd never specified a value so assumed that the default would be used, which is not the case.
myswap.swp
entware/var/log/*
skynet/skynet.log
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.38.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
Backup Target Network Connection Tester
----------------------------------------------------------------
1 : Test Target Media Type : Network
2 : Test Target Username : Admin
3 : Test Target Password : Admin
4 : Test Target UNC Path : \\\\192.168.1.1\\Backups
5 : Test Target Backup Mount Point : /tmp/mnt/SamsungSSD/Backups
6 : Test Target Dir Path : /router/test-backup
|
t : Test your Network Backup Connection
p : Import your Primary Backup Settings
s : Import your Secondary Backup Settings
e : Exit Back to Setup + Operations Menu
----------------------------------------------------------------
Selection: t
Messages:
INFO: Backup Target (192.168.1.1) reachable via PING.
INFO: External test drive mount point exists. Found under: /tmp/mnt/SamsungSSD/Backups
mount: mounting \\192.168.1.1\Backups on /tmp/mnt/SamsungSSD/Backups failed: Invalid argument
WARNING: Unable to mount to external network drive. Retrying...
mount: mounting \\192.168.1.1\Backups on /tmp/mnt/SamsungSSD/Backups failed: Invalid argument
WARNING: Unable to mount to external network drive. Retrying...
ERROR: Unable to mount to external network drive (/tmp/mnt/SamsungSSD/Backups). Please check your configuration. Exiting.
Press any key to acknowledge...
ERROR: Failed to run Network Backup Test Script -- Drive mount failed. Please check your configuration!
Press any key to acknowledge...
Try picking the USB method (instead of Network)... and selecting the target mount point path.I have 2 partitions on my SSD, however, Is there a way to mount my 2nd NTFS partition? This is the error I'm getting:
Code:Backup Target Network Connection Tester ---------------------------------------------------------------- 1 : Test Target Media Type : Network 2 : Test Target Username : Admin 3 : Test Target Password : Admin 4 : Test Target UNC Path : \\\\192.168.1.1\\Backups 5 : Test Target Backup Mount Point : /tmp/mnt/SamsungSSD/Backups 6 : Test Target Dir Path : /router/test-backup | t : Test your Network Backup Connection p : Import your Primary Backup Settings s : Import your Secondary Backup Settings e : Exit Back to Setup + Operations Menu ---------------------------------------------------------------- Selection: t Messages: INFO: Backup Target (192.168.1.1) reachable via PING. INFO: External test drive mount point exists. Found under: /tmp/mnt/SamsungSSD/Backups mount: mounting \\192.168.1.1\Backups on /tmp/mnt/SamsungSSD/Backups failed: Invalid argument WARNING: Unable to mount to external network drive. Retrying... mount: mounting \\192.168.1.1\Backups on /tmp/mnt/SamsungSSD/Backups failed: Invalid argument WARNING: Unable to mount to external network drive. Retrying... ERROR: Unable to mount to external network drive (/tmp/mnt/SamsungSSD/Backups). Please check your configuration. Exiting. Press any key to acknowledge... ERROR: Failed to run Network Backup Test Script -- Drive mount failed. Please check your configuration! Press any key to acknowledge...
I appreciate the quick response, switched to USB and this is the new error I'm getting now:Try picking the USB method (instead of Network)... and selecting the target mount point path.
BACKUPMON v1.38
Normal Backup starting in 10 seconds. Press [S]etup or [X] to override and enter RESTORE mode
Asus Router Model: GT-AX11000
Firmware/Build Number: 3004.388.4_0
External USB Drive Mount Path: /tmp/mnt/SamsungSSD
Backing up to USB mounted to /tmp/mnt/SamsungSSD/Backups/Backup directory location: /router/GT-AX11000-Backups
Frequency: Monthly
Mode: Basic
[Primary Backup Commencing]...
Messages:
STATUS: External drive (USB) skipping mounting process.
ERROR: Failed to run Backup Script -- Drive mount failed. Please check your configuration!
Selection: t
Messages:
INFO: Backup Target (192.168.1.1) reachable via PING.
INFO: External test drive mount point exists. Found under: /tmp/mnt/SamsungSSD
Press any key to acknowledge...
STATUS: External test drive (\\192.168.1.1\Backups) mounted successfully under: /tmp/mnt/SamsungSSD
STATUS: Test Backup Directory successfully created under: /router/test-backup
STATUS: Daily Test Backup Subdirectory successfully created under: /router/test-backup/test
/jffs/scripts/backupmon.sh: line 30: can't create /tmp/mnt/SamsungSSD/router/test-backup/Test/testfile.txt: nonexistent directory
STATUS: Finished copying testfile.txt to /tmp/mnt/SamsungSSD/router/test-backup/test
STATUS: Settling for 10 seconds...
STATUS: External test tetwork drive (\\192.168.1.1\Backups) unmounted successfully.
Press any key to acknowledge...
Doesn't sound like your picking the right mount point? Is this right? Is the mount point picker allowing you to select this? Also, it looks like according to the logs above, it's using the network method again?I appreciate the quick response, switched to USB and this is the new error I'm getting now:
Code:BACKUPMON v1.38 Normal Backup starting in 10 seconds. Press [S]etup or [X] to override and enter RESTORE mode Asus Router Model: GT-AX11000 Firmware/Build Number: 3004.388.4_0 External USB Drive Mount Path: /tmp/mnt/SamsungSSD Backing up to USB mounted to /tmp/mnt/SamsungSSD/Backups/Backup directory location: /router/GT-AX11000-Backups Frequency: Monthly Mode: Basic [Primary Backup Commencing]... Messages: STATUS: External drive (USB) skipping mounting process. ERROR: Failed to run Backup Script -- Drive mount failed. Please check your configuration!
Update: I removed the "Backups" folder inside the "SamsungSSD" and now it's mounting: tmp/mnt/SamsungSSD/"Backups"to read: /tmp/mnt/SamsungSSD
Code:Selection: t Messages: INFO: Backup Target (192.168.1.1) reachable via PING. INFO: External test drive mount point exists. Found under: /tmp/mnt/SamsungSSD Press any key to acknowledge... STATUS: External test drive (\\192.168.1.1\Backups) mounted successfully under: /tmp/mnt/SamsungSSD STATUS: Test Backup Directory successfully created under: /router/test-backup STATUS: Daily Test Backup Subdirectory successfully created under: /router/test-backup/test /jffs/scripts/backupmon.sh: line 30: can't create /tmp/mnt/SamsungSSD/router/test-backup/Test/testfile.txt: nonexistent directory STATUS: Finished copying testfile.txt to /tmp/mnt/SamsungSSD/router/test-backup/test STATUS: Settling for 10 seconds... STATUS: External test tetwork drive (\\192.168.1.1\Backups) unmounted successfully. Press any key to acknowledge...
But now it's failing to mount again, I will try rebooting router.
These are my 2 partitions below & the drive-mount point it's automatically choosing sda1 when selecting USB. I will uninstall script, reboot router and start from scratch! Thanks for helping out!Doesn't sound like your picking the right mount point? Is this right? Is the mount point picker allowing you to select this? Also, it looks like according to the logs above, it's using the network method again?
/tmp/mnt/SamsungSSD/Backups/
PS. Please post a screenshot of what mount points you see with the mount point selector?
@GT-AX11000-XXXX:/tmp/home/root# blkid
/dev/sda2: LABEL="SamsungSSD" UUID="1208C4EC3A509DCF"
/dev/sda1: LABEL="Diversion" UUID="560672ad-c776-4ef4-905c-2823bc292c46"
Source Router Model : GT-AX11000
: Source Router Firmware/Build : 3004.388.4_0
1 : Source EXT USB Drive Mount Point : /tmp/mnt/Diversion
2 : Backup Target Media Type : USB
3 : Backup Target Username : admin
4 : Backup Target Password (ENC) : YWRtaW4K
5 : Backup Target UNC Path : \\\\192.168.50.25\\Backups
6 : Backup Target Mount Point : /tmp/mnt/SamsungSSD
7 : Backup Target Directory Path : /router/GT-AX11000-Backups
8 : Backup Exclusion File Name :
9 : Backup Frequency? : Monthly
|--- Purge Backups? : No
| - Purge older than (days): : N/A
10 : Backup/Restore Mode : Basic
11 : Schedule Backups? : No
| - Time: : 2:30
|--- Scheduled Backup Mode : Backup Only
12 : Secondary Backup Config Options : Disabled
Selection: 1
1. Please choose the SOURCE Mount Point of your attached external USB Drive that
contains data that you want to have backed up. In most cases, whatever is
attached to your sda1 partition should be selected. Should there be only one
mount point available, it will be automatically selected.
(Recommended drive on sda1 = /tmp/mnt/Diversion)
Mount Point Selected:
/tmp/mnt/Diversion
Press any key to acknowledge...
So just to clarify... when you go through option #1, you aren't presented with both of your partitions? It just auto-selects "/tmp/mnt/Diversion", and doesn't give you a choice? It looks like both your mount point paths are correct in your screenshot above... when you run the backup, are you still getting errors, eventhough they're pointing to /tmp/mnt/Diversion and /tmp/mnt/SamsungSSD?These are my 2 partitions below & the drive-mount point it's automatically choosing sda1 when selecting USB. I will uninstall script, reboot router and start from scratch! Thanks for helping out!
Code:@GT-AX11000-XXXX:/tmp/home/root# blkid /dev/sda2: LABEL="SamsungSSD" UUID="1208C4EC3A509DCF" /dev/sda1: LABEL="Diversion" UUID="560672ad-c776-4ef4-905c-2823bc292c46"
Code:Source Router Model : GT-AX11000 : Source Router Firmware/Build : 3004.388.4_0 1 : Source EXT USB Drive Mount Point : /tmp/mnt/Diversion 2 : Backup Target Media Type : USB 3 : Backup Target Username : admin 4 : Backup Target Password (ENC) : YWRtaW4K 5 : Backup Target UNC Path : \\\\192.168.50.25\\Backups 6 : Backup Target Mount Point : /tmp/mnt/SamsungSSD 7 : Backup Target Directory Path : /router/GT-AX11000-Backups 8 : Backup Exclusion File Name : 9 : Backup Frequency? : Monthly |--- Purge Backups? : No | - Purge older than (days): : N/A 10 : Backup/Restore Mode : Basic 11 : Schedule Backups? : No | - Time: : 2:30 |--- Scheduled Backup Mode : Backup Only 12 : Secondary Backup Config Options : Disabled
Code:Selection: 1 1. Please choose the SOURCE Mount Point of your attached external USB Drive that contains data that you want to have backed up. In most cases, whatever is attached to your sda1 partition should be selected. Should there be only one mount point available, it will be automatically selected. (Recommended drive on sda1 = /tmp/mnt/Diversion) Mount Point Selected: /tmp/mnt/Diversion Press any key to acknowledge...
Just to clarfiy....On my initial setup it did presented me with both partitions during option 1 and I thought I had setup everything correctly with the exception of choosing Network vs USB. I did try to uninstall and reinstall the script without rebooting router and this is when the script was automatically choosing sda1.So just to clarify... when you go through option #1, you aren't presented with both of your partitions? It just auto-selects "/tmp/mnt/Diversion", and doesn't give you a choice? It looks like both your mount point paths are correct in your screenshot above... when you run the backup, are you still getting errors, eventhough they're pointing to /tmp/mnt/Diversion and /tmp/mnt/SamsungSSD?
EDIT... Sorry @Kingp1n... I guess you stated that above... @Martinski... any idea why this might be happening?
You really shouldn't have to reboot... the mount point selector should always show you all the available partitions to choose from... that's what's confusing here. If it was only selecting sda1, then the router wasn't recognizing sda2... which is weird. Maybe it has to take some time for it to recognize? No idea. ;(Just to clarfiy....On my initial setup it did presented me with both partitions during option 1 and I thought I had setup everything correctly with the exception of choosing Network vs USB. I did try to uninstall and reinstall the script without rebooting router and this is when the script was automatically choosing sda1.
However I will uninstall completely, reboot router and try again from scratch choosing USB to see if it makes a difference. Thanks for the input.
Keep in mind, partitions could be buggy as well. It couldn't hurt to ensure the partition is in good health.You really shouldn't have to reboot... the mount point selector should always show you all the available partitions to choose from... that's what's confusing here. If it was only selecting sda1, then the router wasn't recognizing sda2... which is weird. Maybe it has to take some time for it to recognize? No idea. ;(
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!