-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto purge not working on expired backups #9
Comments
Likely, the backups are not being monitored for deletion. Backups will only be monitored if you set the Also, keep in mind that setting |
I have set the |
Could you provide a copy of the service call your making in your automation? Can you call the service below from the Developer Tools > Services section.
After calling that service, check the sensor to see if Also if you can provide the logs created when calling the service that would be great. To enable debug logging use the logger component. Below is an example to enable debug logging for auto_backup, you can just paste that into your configuration.yaml.
|
I have provided a copy of my service call below
|
I tried the service call below
I can see that the |
|
Well sounds like everything is working correctly, you can now either call There may just be an issue with your automations. Can you confirm that your automations are valid and are triggering correctly? Try running 'Check Configuration' to make sure your YAML is valid. This is an example of a valid automation that you could put in your automations.yaml file.
|
My backups are triggering correctly. Below are the 2 automations I have
|
Yep, those look fine, try manually triggering one of the automations from the web UI (wait for it to finish) and watch the Auto Backup sensor. Also, it doesn't look like your automations clash, so this shouldn't apply to your situation, but I still want to mention that Auto Backup can (currently) only perform one snapshot at a time, if you try to create another snapshot before the other one has finished, Hass.io may still create the second snapshot but it will not be monitored by Auto Backup. |
I manually triggered and the automation successfully ran and created the backup. However, |
I saw this notification this morning Snapshot Failed. I am not sure how this is possible. |
Yeah, I'm not sure either. That error means the request to the Hass.io API was successful, but the response from Hass.io was not valid, i.e it didn't contain the identifier for the snapshot. Hass.io may have created the backup but some error happened and it didn't give Auto Backup the ID. Usually, this is caused when another backup is currently in progress, so naturally, make sure there are no other automations or addons that could be creating a backup at that time. Did you just add that notification automation, or has that been present the whole time? To help you any further I'm going to need those debug logs that I mentioned earlier, so I can properly see what's going on. |
I have attached the logs below from last night. The backup
|
Thanks! This makes it a lot clearer. The issue is due to a timeout error. Auto Backup waits by default 20 minutes for a snapshot to complete, if it takes longer than that, it is assumed the snapshot failed. This is usually caused by taking large backups. There is a configuration option to increase this timeout Try taking a manual full backup and timing how long it takes then add like 20 minutes.
|
I increased the timeout time to 40 minutes as the full backup took around 21 minutes.
At 40 minutes, the snapshot creation timed out. However, I can see that the Partial Backup |
Well, this has me very confused, I've tried to do some digging into the snapshots API and can't find anything to explain why this is occurring. How big are you full/partial snapshots? Was the partial snapshot created after the timeout, i.e did it take over 40 minutes to create? What is seems like is that the API is waiting forever and not returning a response, so maybe it's some kind of connection issue? |
Yes, the backups are getting created. I increased the timeout to 50 minutes but still the same issue. Full backup is a little under 1GB. Partial backup is just under 400MB. |
My best guess at this point considering when you did an empty partial backup everything worked correctly, is that due to their size and possibly your hardware that either
Otherwise, if the backup completes before AutoBackup reports an error
For context, my full backups are about 100MB (occasionally up to 160MB) and partial backups are 60MB and I've never had an issue with timeouts or otherwise. They take about 1.5 minutes and 30 seconds respectively. Which occurs first, the backup being created or Auto Backup reporting an error? This will tell me which path to go down. |
Just reading and might be totally wrong but cant a external storage situation or similar make time outs when not wanted. I have no idea of course in this case if storage is on another unit with a path, but it was just a thought in my head. Take care. |
Hello, I'm facing the exact issue. I can say that everything was working fine with the same backup dimensions before until some version before. I would say until 106.0 or something was working fine |
I am not sure, whether I have the same issue, but my list of snapshots got really long and I started to look why the purging is not working and it seems to have been caused by the fact, that all requests for snapshot creation were timing out and hence autobackup was not getting their IDs. |
Same error. I create the backups with Node-Red, they succeed. I run the purge before every new save (they are set to 2 days). |
I'm a recent convert and confirm that the keep_days setting and auto_backup.purge service call only impact backups created by auto_backup. |
ok i think everyone is aware of this. we have read the documentation. |
I have set auto_purge to true. However, I have noticed that expired backups are not getting automatically purged. Not sure what's wrong.
The text was updated successfully, but these errors were encountered: