Weekly Proxmox Backup of OPNSense VM w/ Zenarmor - Reporting database stops ?!?

Started by rfox, April 06, 2025, 02:20:06 PM

Previous topic - Next topic
I have been successfully running my OPNSense box under Proxmox as a VM - all works well with Zenarmor - but once a week I perform a PBS backup of the VM (using snapshot mode) - and every time the Zenarmor reporting database seems to stop after the backup and needs to be manually restarted ??  Naturally I can schedule a fresh reboot of the VM after the backup, but that seems harsh . . . not sure if there's a way to simply restart Zenarmor or just the reporting database using cron or something ?? 

Any tips welcome!



Hi,

Which database are you using? Could you please share its version?


Hi,

Use the following command to restart Elasticsearch: service elasticsearch restart.

Quote from: sy on April 08, 2025, 08:02:27 AMHi,

Use the following command to restart Elasticsearch: service elasticsearch restart.

Thanks - can I schedule that with cron to happen right after the backup?  If yes - any hints on how?  I'm not the strongest using cron . . .

Hi,

OPNsense remove after cron service restart if you add a manuel entry to cron file. To make it permanent in GUI please do the followings

1- create a file in "/usr/local/opnsense/service/conf/actions.d/actions_reportingdb.conf"

2- File content should be
[start]
command:service elasticsearch restart
parameters:
type:script
message:Zenarmor Reporting DB is restarting
description:Zenarmor Reporting DB Restart

3- Navigate System - Settings - Cron

4- Add a new cron, set the time and date settings and select "Zenarmor Reporting DB Restart" in Command field and save the cron.



Quote from: sy on April 08, 2025, 02:31:39 PMHi,

OPNsense remove after cron service restart if you add a manuel entry to cron file. To make it permanent in GUI please do the followings

1- create a file in "/usr/local/opnsense/service/conf/actions.d/actions_reportingdb.conf"

2- File content should be
[start]
command:service elasticsearch restart
parameters:
type:script
message:Zenarmor Reporting DB is restarting
description:Zenarmor Reporting DB Restart

3- Navigate System - Settings - Cron

4- Add a new cron, set the time and date settings and select "Zenarmor Reporting DB Restart" in Command field and save the cron.




Just what the doctor ordered!  Many thanks - will try this shortly!