but yeah optional with a tip for that time would’ve been better
I agree, please allow to have a custom time.
Adding to that
- What if a person has backing up database disabled
- What about people hosting the recorder database elsewhere instead of using sqlite?
Having a fixed schedule is pointless in those cases.
Please add a way to change the time.
I have history turned off on mine. It’s an option. I don’t back-up my database.
Make sure the database is in the /share folder (There is an option to include that) or in the add-on folder backed up with the addon. If it’s elsewhere that is not part of Home Assistant and you have to find your own way.
What if’s could go on forever…
Can the creator who is all powerful make a rock that is so big that they can’t lift it?
Can you add 1 more item to an infinite list of items?
My point is meant as a counterpoint to the fixed 4:45 backup time.
I host my database on another machine and handle backups of that completely separately.
This means there is zero need to force the backup time to 4:45 since the database can be either not backed up or not present on the machine at all - therefore no need to wait for the database cleanup process.
If you look at the direction they are thinking of in the video, well, you should look at it. You may not like it.
For 98% of HA users, this is fine. For the rest of us that have advanced systems like putting your database in strange places, do your own thing and don’t use the automatic. It’s really that simple.
I don’t mind it if it defaulted or strongly recommended a specific time. But not letting me change it is a bit strange. I often tinker with my setup in the afternoon, so odds are it’s going to regularly backup something half baked. I want it to backup at night, like most other things.
I seems that if we use this way by automation, the auto purge of old backups is not done, you confirm ? I don’t see any parameter like that on the backup action.
Yes this is correct. I have a calendar reminder to delete my daily backups every sunday. (which I dont do sometimes, but they are about 4GB and I have a 250 GB SSD, so that isnt a problem.
I had a cronjob deleting the old backups nightly:
cd /dozer/docker/homeassistant/backups
ls -tp *.tar | grep -v '/$' | tail -n +6 | xargs -I {} rm -- {}
The new backup way features this automatically, and also encrypts the backups – but doesn’t allow me to schedule the backup to my liking at the moment, so I guess I’ll stick with my old way.
Seems to me like a pretty simple fix to make this work for 100% of people (instead of just the few that don’t tinker) would be to make it so that the database cleanup time can be changed.
The automatic backup sounds like a great idea, especially with a built-in retention policy, however not being able to adjust it’s time is a glaring oversight without any possible defense to it being like this.
“For the rest of us that have advanced systems”, where in the HA OS is the 4:45am time hardcoded? There must be a file somewhere that has that time in it that we could change to be better aligned with our needs.
Or, better yet, clean the database automatically as the first step of the backup process.
I upload my HAOS backups to my PC, which is rarely on at nearly 5 in the morning. If the database cleaning is the only problem, then wouldn’t this be the best/easiest solution?
It’s pretty funny to me that this even got out the door with a fixed 4:45 AM backup time. Anyone who has released scheduling functionality before would know that the very first question asked about this feature would be “how do I change the time?”
This is the “cleanest” (ha) solution in my opinion. Just run a database cleanup whenever a backup runs if that’s really the main blocker. Or, worst case, let the user know that backups before 4:45 may not include a clean database and let them decide.
Same story, NAS is off at that time… also I tried it to only backup on Sundays thinking I’ll schedule the NAS to come on earlier on Sundays- yet it tried to backup on a Wednesday
“Cleanup Time” should also be configurable. If the NAS is scheduled to be turned off at night, an automatic backup would never be performed.
My NAS is turned off, too at 4:45
.
I’m using community addon “Auto Backup”.
I’m with most other people on this thread who has a NAS that is switched off at 4.45. This is really annoying that its not customizable.
Please no, unless the pre-backup db clean is added only for automatic backups. When I request a backup manually, I wouldn’t expect it to do a bunch of cleanup first – both because I don’t expect a backup operation to change what I’m backing up, and second because I might be (impatiently) waiting for the backup to complete to do something that I might want to revert
That’s a fair point!
For the ones watching this thread:
It will be in the next version 2025.2 Beta: Iterating on backups - Home Assistant