Skip to content
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 backup can't purge backup on network storage #173

Open
Zagrthos opened this issue Dec 30, 2024 · 6 comments
Open

Auto backup can't purge backup on network storage #173

Zagrthos opened this issue Dec 30, 2024 · 6 comments

Comments

@Zagrthos
Copy link

Zagrthos commented Dec 30, 2024

The problem

I have my system configured that it stores backups automatically on a remote network storage (my NAS basically). The storing and all works pretty fine but each time when it should purge an old backup (because of expiring times) it throws errors inside the Homeassistant log file.

What version of Auto Backup has the issue?

1.5.3

What version of Home Assistant are you running?

Core 2024.12.5

What type of installation are you running?

Home Assistant OS

If you're running HA OS/Supervised, what version of the Supervisor are you running?

Supervisor 2024.12.0

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-12-30 18:37:39.135 ERROR (MainThread) [custom_components.auto_backup.handlers] /backups/d2095cf7 return code 404.
2024-12-30 18:37:39.135 ERROR (MainThread) [custom_components.auto_backup] Failed to purge backup: 
2024-12-30 18:37:39.144 ERROR (MainThread) [custom_components.auto_backup.handlers] /backups/4f640b61 return code 404.
2024-12-30 18:37:39.144 ERROR (MainThread) [custom_components.auto_backup] Failed to purge backup:

Additional information

Edit, 2 mins later:
The mentioned backup files aren't even there on the NAS storage. Why does it still want to delete them?

@ahwman
Copy link

ahwman commented Dec 31, 2024

I’m having the same issue…

@l0choli
Copy link

l0choli commented Jan 1, 2025

+1
/backups/7962229d return code 404.
/backups/5294d4db return code 404.
/backups/8580dde0 return code 404.
/backups/5a2f06d4 return code 404.

@tommetje
Copy link

tommetje commented Jan 4, 2025

Same issue. I checked if the 'backups' directory somehow was created locally in case the network drive was not reachable, no luck.

There is no 'backups' directory on my network drive btw.

@jcwillox
Copy link
Owner

jcwillox commented Jan 5, 2025

Home Assistant handles the deletion of backups, and can only delete backups from /backups afaik, or maybe if you setup an alternate or additional backup location in the UI, but if the the backups are moved from the location or deleted externally HA will fail to delete the backup.

Auto Backup doesn't check if a backup was removed externally and just tries to delete it anyway, you can treat the error as more of a warning that it couldn't find the backup it was supposed to remove. This should be rare as you should set keep_days if you plan to move the backup from its original location.

@Doorshifter
Copy link
Contributor

I had the same issue.

To get rid of the 404 error/warning I took a look in this ascii file /homeassistant/.storage/auto_backup.snapshots_expiry.

Be aware that if you use the HA File Editor add-on you will have to set it's Enforce Basepath to 'false'
If set to true, access is limited to files within the /config directory.

The lines you're after have the same HEX number in them as mentioned in the error message.
If you carefully remove the lines that refer to your '404 backups' and safe the changes, you wil be ok after a HA restart.

@tommetje
Copy link

tommetje commented Jan 7, 2025

I had the same issue.

To get rid of the 404 error/warning I took a look in this ascii file /homeassistant/.storage/auto_backup.snapshots_expiry.

Be aware that if you use the HA File Editor add-on you will have to set it's Enforce Basepath to 'false'
If set to true, access is limited to files within the /config directory.

The lines you're after have the same HEX number in them as mentioned in the error message.
If you carefully remove the lines that refer to your '404 backups' and safe the changes, you wil be ok after a HA restart.

This works, thanks for sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants