@visortgw -- I think I'm at the point where this functionality is looking and working good! I would love it if you could please give this beta a shot, and let me know how this works for you? When the primary and secondary backups are configured in BACKUPMON, you would only need 1 cron statement to kick everything off, as they will run one after the other.I was bored last night, so I hacked something together to accomplish this:
There may be a more elegant way, but this works like a champ in the interim!
- Copy /jffs/addons/backupmon.d/backupmon.cfg to /jffs/addons/backupmon.d/backupmon1.cfg and /jffs/addons/backupmon.d/backupmon2.cfg.
- Edit /jffs/addons/backupmon.d/backupmon1.cfg to disable schedule.
- Edit /jffs/addons/backupmon.d/backupmon2.cfg to disable schedule and to edit details for second server (i.e., minimally config items 1-4 from GUI). Be sure that the local drive mount path is different than that in /jffs/addons/backupmon.d/backupmon1.cfg.
- Create two mini-scripts — /jffs/scripts/backupmon1 and /jffs/scripts/backupmon1:
Code:#!/bin/sh cp /jffs/addons/backupmon.d/backupmon1.cfg /jffs/addons/backupmon.d/backupmon.cfg sh /jffs/scripts/backupmon.sh -- AND -- #!/bin/sh cp /jffs/addons/backupmon.d/backupmon2.cfg /jffs/addons/backupmon.d/backupmon.cfg sh /jffs/scripts/backupmon.sh
- Change permissions of two mini-scripts to 755.
- Create two crontab entries in /jffs/scripts/post-mount to run the two mini-scripts. I staggered them by 15 minutes.
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.20b1.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
Will try to fit it in later today...@visortgw -- I think I'm at the point where this functionality is looking and working good! I would love it if you could please give this beta a shot, and let me know how this works for you? When the primary and secondary backups are configured in BACKUPMON, you would only need 1 cron statement to kick everything off, as they will run one after the other.
What's new!?
v1.20b1 - (September 24, 2023)
- MAJOR: Added the capability of running backups to a secondary backup target! Many thanks to @visortgw for the suggestion! Item #10 in the configuration utility allows you to configure all necessary information to set up a secondary backup target. You can choose a completely different kind of backup frequency compared to your primary backup method, and will also be able to be purged/autopurged should you allow it. When you install this version, **please** make sure you save a new configuration from the configuration utility as many new variables have been added to keep track of this functionality.
- MINOR: Added a notification in the configuration utility to remind you to save when new activity has been noticed.
- MINOR: General improvements to visual consistency and messaging.
Download link (will require a manual download from this link below):
Code:curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.20b1.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
Significant Screenshots:
On the main configuration screen, a new option #10 has been added to configure secondary backups. Also, a "save your changes" prompt appears after some activity is being noticed to give you that friendly reminder to save before you exit!
View attachment 53256
As you can see in the secondary backup configuration item, much of the same information required that you would need for your primary backup is also required for a second backup target location. In my case, I'm using the same exclusions file between my primary and secondary backup locations. Purging is also available for secondary backups, and in fact, you can choose a completely different frequency (Weekly/Monthly/Yearly or Perpetual) compared to your primary backups!
View attachment 53255
Here you can see the secondary backup running immediately after the primary backup finishes. If you have autopurge enabled, it will run through those as well after the backups have completed.
View attachment 53257
Option "bm"... very fitting. LOLConfirmed:
I thought the same, but opted to stay silent this time...Option "bm"... very fitting. LOL
Bad manners?Option "bm"... very fitting. LOL
The common expression for "bm" is "bowel movement".Bad manners?
Suggestions are welcome, like bp fu br bn up bum (back up Mon) vj1 bac upy, the list goes on.The common expansion for "bm" is "bowel movement".
Please keep it! I'm fine with it...Suggestions are welcome, like bp fu br bn up bum (back up Mon) vj1 bac upy, the list goes on.
I'll take it a step further, literally: bumPlease keep it! I'm fine with it...
I'll take it a step further, literally: bum
@Viktor Jaep Everything appears to be backing up correctly to both "local" (my NAS on my network) and "remote" (another NAS to which I have access via standing VPN connection) Synology NASs. Unfortunately, there is an Unknown operand error thrown after both are complete:@visortgw -- I think I'm at the point where this functionality is looking and working good! I would love it if you could please give this beta a shot, and let me know how this works for you? When the primary and secondary backups are configured in BACKUPMON, you would only need 1 cron statement to kick everything off, as they will run one after the other.
What's new!?
v1.20b1 - (September 24, 2023)
- MAJOR: Added the capability of running backups to a secondary backup target! Many thanks to @visortgw for the suggestion! Item #10 in the configuration utility allows you to configure all necessary information to set up a secondary backup target. You can choose a completely different kind of backup frequency compared to your primary backup method, and will also be able to be purged/autopurged should you allow it. Also, if secondary backups are enabled, when you run the restoration procedure, it will prompt you whether you want to restore from your primary or secondary backup source. When you install this version, **please** make sure you save a new configuration from the configuration utility as many new variables have been added to keep track of this functionality.
- MINOR: Added a notification in the configuration utility to remind you to save when new activity has been noticed.
- MINOR: General improvements to visual consistency and messaging.
Download link (will require a manual download from this link below):
Code:curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.20b1.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
Significant Screenshots:
On the main configuration screen, a new option #10 has been added to configure secondary backups. Also, a "save your changes" prompt appears after some activity is being noticed to give you that friendly reminder to save before you exit!
View attachment 53256
As you can see in the secondary backup configuration item, much of the same information required that you would need for your primary backup is also required for a second backup target location. In my case, I'm using the same exclusions file between my primary and secondary backup locations. Purging is also available for secondary backups, and in fact, you can choose a completely different frequency (Weekly/Monthly/Yearly or Perpetual) compared to your primary backups!
View attachment 53255
Here you can see the secondary backup running immediately after the primary backup finishes. If you have autopurge enabled, it will run through those as well after the backups have completed.
View attachment 53257
It is also now possible to restore from either the primary or secondary backup locations if enabled. When you run the restoration option, it will prompt you which set of backups you would like to restore from.
View attachment 53258
[Primary Backup Commencing]...
Messages:
STATUS: External Drive (\\192.168.222.5\NetBackup) mounted successfully under: /tmp/mnt/NetBackup1
STATUS: Finished backing up JFFS to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000/24/jffs.tar.gz.
STATUS: Finished backing up EXT Drive to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000/24/TheS1RsUSB.tar.gz.
STATUS: Finished backing up NVRAM to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000/24/nvram.cfg.
STATUS: Finished copying backupmon.sh script to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000.
STATUS: Finished copying backupmon.cfg script to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000.
STATUS: Finished copying exclusions script to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000.
STATUS: Finished copying reference nvram.txt extract to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000.
STATUS: Finished copying restoration instructions.txt to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000.
STATUS: Settling for 10 seconds...
STATUS: External Drive (\\192.168.222.5\NetBackup) unmounted successfully.
[Secondary Backup Commencing]...
Messages:
STATUS: Secondary External Drive (\\192.168.1.3\NetBackup) mounted successfully under: /tmp/mnt/NetBackup2
STATUS: Finished secondary backup of JFFS to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000/24/jffs.tar.gz.
STATUS: Finished secondary backup of EXT Drive to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000/24/TheS1RsUSB.tar.gz.
STATUS: Finished secondary backup of NVRAM to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000/24/nvram.cfg.
STATUS: Finished secondary copy of backupmon.sh script to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000.
STATUS: Finished secondary copy of backupmon.cfg script to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000.
STATUS: Finished secondary copy of exclusions script to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000.
STATUS: Finished secondary reference copy of nvram.txt extract to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000.
STATUS: Finished secondary copy of restoration instructions.txt to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000.
STATUS: Settling for 10 seconds...
STATUS: Secondary External Drive (\\192.168.1.3\NetBackup) unmounted successfully.
[: 1: unknown operand
Scheduling appears to work as well, but there Unknown operand still occurs in the same place.@Viktor Jaep Everything appears to be backing up correctly to both "local" (my NAS on my network) and "remote" (another NAS to which I have access via standing VPN connection) Synology NASs. Unfortunately, there is an Unknown operand error thrown after both are complete:
I haven't turned on scheduling YET...Code:[Primary Backup Commencing]... Messages: STATUS: External Drive (\\192.168.222.5\NetBackup) mounted successfully under: /tmp/mnt/NetBackup1 STATUS: Finished backing up JFFS to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000/24/jffs.tar.gz. STATUS: Finished backing up EXT Drive to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000/24/TheS1RsUSB.tar.gz. STATUS: Finished backing up NVRAM to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000/24/nvram.cfg. STATUS: Finished copying backupmon.sh script to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000. STATUS: Finished copying backupmon.cfg script to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000. STATUS: Finished copying exclusions script to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000. STATUS: Finished copying reference nvram.txt extract to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000. STATUS: Finished copying restoration instructions.txt to /tmp/mnt/NetBackup1/TheS1RsGT-AX6000. STATUS: Settling for 10 seconds... STATUS: External Drive (\\192.168.222.5\NetBackup) unmounted successfully. [Secondary Backup Commencing]... Messages: STATUS: Secondary External Drive (\\192.168.1.3\NetBackup) mounted successfully under: /tmp/mnt/NetBackup2 STATUS: Finished secondary backup of JFFS to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000/24/jffs.tar.gz. STATUS: Finished secondary backup of EXT Drive to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000/24/TheS1RsUSB.tar.gz. STATUS: Finished secondary backup of NVRAM to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000/24/nvram.cfg. STATUS: Finished secondary copy of backupmon.sh script to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000. STATUS: Finished secondary copy of backupmon.cfg script to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000. STATUS: Finished secondary copy of exclusions script to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000. STATUS: Finished secondary reference copy of nvram.txt extract to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000. STATUS: Finished secondary copy of restoration instructions.txt to /tmp/mnt/NetBackup2/TheS1RsGT-AX6000. STATUS: Settling for 10 seconds... STATUS: Secondary External Drive (\\192.168.1.3\NetBackup) unmounted successfully. [: 1: unknown operand
Very interesting. Let me look into what that's all about. Going to assume you saved your configs... could you please share your config contents so I can try to duplicate as much as possible?Scheduling appears to work as well, but there Unknown operand still occurs in the same place.
Sent via PM.Very interesting. Let me look into what that's all about. Going to assume you saved your configs... could you please share your config contents so I can try to duplicate as much as possible?
Just posted a second beta... this one contains default values for all variables, and will populate the value for the missing variable you and @Ripshod were experiencing.Sent via PM.
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.20b2.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
How do I force it to populate they missing variable?Just posted a second beta... this one contains default values for all variables, and will populate the value for the missing variable you and @Ripshod were experiencing.
Please give this one a shot, save your config, and see if that made a difference in getting rid of that unknown operand error?
Code:curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.20b2.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
How do I force it to populate they missing variable?
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/BACKUPMON/master/backupmon-1.20b2.sh" -o "/jffs/scripts/backupmon.sh" && chmod 755 "/jffs/scripts/backupmon.sh"
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!