46
21.1 Legacy Series / Re: Frequency of git based config backups?
« on: February 25, 2021, 12:55:05 am »
Yeah good note to add to the docs.
If you look at the logs on your OPNsense without any extra crons added, you will notice the remote backup happens at 1am, atleast in my timezone, I would guess its the same for all.
If you can confirm its the case for other timezones, add it to the doc :-)
My time zone is Europe/London.
Edit
Quick look in the code and this line sets the Cron for the backup, but little unsure on syntax but I'm guessing it means 0 minute and 1st hour. Which lines up with my log time. I'm on my phone otherwise I would confirm the values of that array.
If you look at the logs on your OPNsense without any extra crons added, you will notice the remote backup happens at 1am, atleast in my timezone, I would guess its the same for all.
Code: [Select]
2021-02-24T01:00:00 configd.py[4643] [2cadc370-55c0-4654-b009-8a0b2474e66b] Performing remote backup
If you can confirm its the case for other timezones, add it to the doc :-)
My time zone is Europe/London.
Edit
Quick look in the code and this line sets the Cron for the backup, but little unsure on syntax but I'm guessing it means 0 minute and 1st hour. Which lines up with my log time. I'm on my phone otherwise I would confirm the values of that array.
Code: [Select]
$jobs[]['autocron'] = array('configctl system remote backup', 0, 1);
https://github.com/opnsense/core/blob/51489f83de93840f2771fd65938658cd25f5a01c/src/etc/inc/plugins.inc.d/core.inc#L199