Option to disable hourly backups

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

teo1966
Posts: 38
Joined: Saturday 18 November 2017 12:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Contact:

Re: Option to disable hourly backups

Post 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:
  1. Remove the 'hourly' directory from the domoticz/backups directory
  2. 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
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
User avatar
waltervl
Posts: 6002
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Option to disable hourly backups

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
solarboy
Posts: 347
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Option to disable hourly backups

Post 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.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
HvdW
Posts: 624
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Option to disable hourly backups

Post 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.
Bugs bug me.
lost
Posts: 667
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Option to disable hourly backups

Post by lost »

waltervl wrote: Tuesday 29 July 2025 15:04 See also wiki https://wiki.domoticz.com/Daily_backup_to_external_hdd
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest