Page 2 of 2
Re: Option to disable hourly backups
Posted: Tuesday 29 July 2025 13:01
by teo1966
joro75 wrote: ↑Monday 13 May 2024 19:51
waltervl wrote: ↑Friday 01 March 2024 9:12
The hourly backup can be disabled by removing the hourly folder in domoticz/backups. Then you only get the daily and monthly backup.
I have tried to remove the 'hourly' directory in domoticz/backups/, however that does NOT disable the hourly backup. The directory is automatically recreated again by Domoticz. I also checked the source code implementation, and that indeed confirms that if the 'hourly' directory is not existing, it will be recreated.
What is working is:
- Remove the 'hourly' directory from the domoticz/backups directory
- Create a file named 'hourly' in the same directory. (For example by using: `touch hourly`)
With this configuration, Domoticz will detect that the 'hourly' directory is not available, and will try to create it, which doesn't succeed as a file with the same name is already present. Also creating the backup file itself will cause an error, which is nicely detected by Domoticz, and is shown as an error in the Log. No further problems or side effects are present. The 'daily' and 'montly' backups are still created, and are not disabled. It is possible to disable the 'daily' and 'monthly' backups with the same trick.
This works but it should be easier if possible
Re: Option to disable hourly backups
Posted: Tuesday 29 July 2025 15:04
by waltervl
Then make use of another daily backup method as mentioned in this topic by other users. See also wiki
https://wiki.domoticz.com/Daily_backup_to_external_hdd
My hourly backup takes 2.2 seconds with a 25 MB database so I see no need to skip it.
To prevent a large database do not use a lot of text sensors that are updated every x minutes with a lot of text.
Re: Option to disable hourly backups
Posted: Tuesday 29 July 2025 23:18
by solarboy
2.2 seconds is a long time when it's on the hour with all the other hourly triggers scripts etc. My system used to be unusable every hour for a lot longer than that when I had hourly backups.
Re: Option to disable hourly backups
Posted: Tuesday 29 July 2025 23:30
by HvdW
solarboy wrote: ↑Tuesday 29 July 2025 23:18
2.2 seconds is a long time when it's on the hour with all the other hourly triggers scripts etc. My system used to be unusable every hour for a lot longer than that when I had hourly backups.
My experience is the same and after a remark from Gizmocuz I stored the basis and now the system works without hiccups.
Re: Option to disable hourly backups
Posted: Wednesday 30 July 2025 9:31
by lost
To avoid disabling whole domoticz managed backup & re-implementing this from script using HTTP API triggered DB backups when one's needs, cleaning daily backup directory & mounting it to a nullfs will do (would then be a /etc/fstab line to add to have this done at boot). That's a BSD feature that is not present by default on Linux but can be added:
https://github.com/abbbi/nullfsvfs
Another solution, with still some light scripting needed, would be to use a bind mount to an existing tmpfs like /tmp + cron job at every HH:55 that deletes previous backup(s) to avoid tmpfs size issues.
This mount option is not widely known but very useful:
https://unix.stackexchange.com/question ... bind-mount