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

Backup page listing empty when network storage is configured #4357

Open
joshtbernstein opened this issue Jun 8, 2023 · 34 comments
Open

Backup page listing empty when network storage is configured #4357

joshtbernstein opened this issue Jun 8, 2023 · 34 comments

Comments

@joshtbernstein
Copy link

joshtbernstein commented Jun 8, 2023

The problem

I've added an CIFS/SMB share as a backup destination.

Server: hostname.example.com
Remote Share: share\folder

After doing so, the backup page no longer lists any backups, local or on the share. Creating a backup works (it's created on the share), but isn't listed.

What version of Home Assistant Core has the issue?

core-2023.6.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Backup

Link to integration documentation on our website

https://www.home-assistant.io/integrations/backup/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Supervisor:
23-06-08 12:29:37 INFO (MainThread) [supervisor.backups.manager] Found 38 backup files

Core:
2023-06-08 12:29:47.932 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /backups/reload request
2023-06-08 12:29:47.934 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /backups/reload -

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Jun 8, 2023

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (backup) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of backup can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign backup Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


backup documentation
backup source
(message by IssueLinks)

@ludeeus ludeeus transferred this issue from home-assistant/core Jun 8, 2023
@perjury
Copy link

perjury commented Jul 12, 2023

Same problem. 2023.7

@perjury
Copy link

perjury commented Jul 13, 2023

I'm getting these errors in the log

Logger: homeassistant.components.hassio
Source: components/hassio/websocket_api.py:130
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: 11 July 2023 at 21:56:57 (20 occurrences)
Last logged: 09:39:34

Failed to to call /resolution/info -
Failed to to call /os/info -
Failed to to call /addons -
Failed to to call /store -
Failed to to call /backups/reload -

and
Logger: homeassistant.components.hassio.handler
Source: components/hassio/handler.py:557
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: 11 July 2023 at 21:56:57 (20 occurrences)
Last logged: 09:39:34

Timeout on /resolution/info request
Timeout on /os/info request
Timeout on /addons request
Timeout on /store request
Timeout on /backups/reload request

@perjury
Copy link

perjury commented Jul 24, 2023

I have discovered that if I reduce the number of backup files then it works. It appears as if the request to list backup files times out

@circa1665
Copy link

Having the same issue:

Logger: homeassistant.components.hassio.handler
Source: components/hassio/handler.py:557
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: 15:49:41 (4 occurrences)
Last logged: 15:50:36

Timeout on /backups/reload request

@PV-Joe
Copy link

PV-Joe commented Aug 2, 2023

Same problem here. The list of backup files in Home Assistant on my Fritz NAS is empty.

Before it took a while for the files to show up.

Please fix that bug. 🙏

@Yorkie71
Copy link

I believe this is a duplicate issue here.
I have worked around this issue by switching to NFS.

@romainrossi
Copy link

romainrossi commented Sep 6, 2023

I have a similar issue : the list is empty when the NAS is powered OFF; but the list is correctly displayed when it is ON.
This append even so I have LOCAL backups (on the HomeAssistant data disk); which should appears in the list irrespective to the availability of the NAS.

Home assistant : 2023.08.3
NAS : Synology, uses SAMBA

@lldaedalusll
Copy link

lldaedalusll commented Oct 6, 2023

Same issue here. I can't see any backups in the HA backups page, even though the backup files are there on the CIFS share and get created by schedule.

Log show the timeout messages for me as well:

2023-10-06 12:02:21.474 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /backups/reload request
2023-10-06 12:02:21.474 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /backups/reload -
2023-10-06 12:04:38.474 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /backups/reload request
2023-10-06 12:04:38.475 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /backups/reload -
2023-10-06 12:05:02.474 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /backups/reload request
2023-10-06 12:05:02.474 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /backups/reload -
2023-10-06 12:06:32.475 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /backups/reload request
2023-10-06 12:06:32.476 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /backups/reload -

Home assistant : 2023.10.0 on rPi4
NAS : CIFS Share on Strato Hidrive

PS: After deleting old backups manually on the share (with now 19 files left) I can now see my backups again in HA as well.

@jmealo
Copy link

jmealo commented Nov 2, 2023

These are all related I think: #4577 #4357 #4358

Copy link

github-actions bot commented Dec 4, 2023

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 4, 2023
@elboletaire
Copy link

This is still an issue with latest versions.

@perjury
Copy link

perjury commented Dec 4, 2023

still an issue for me too

@github-actions github-actions bot removed the stale label Dec 4, 2023
@gzxto1
Copy link

gzxto1 commented Dec 18, 2023

I've started today using SMB for Backups. I ran into the same issue, but found an easy workouround which works for me. On empty backups menu I select "Upload Backups" then the windows file explorer opens, then i close it again without selecting any thing, 5 sec later my 40 backups appear in the list.

@elboletaire
Copy link

I've started today using SMB for Backups. I ran into the same issue, but found an easy workouround which works for me. On empty backups menu I select "Upload Backups" then the windows file explorer opens, then i close it again without selecting any thing, 5 sec later my 40 backups appear in the list.

Thanks for the workaround. Unfortunately does not work for me. I still see it empty.

Not sure how is it working for you anyway, since I don't see any calls whatsoever in the websockets when doing that flow. The only way I see any websocket call is by using the reload option (or the first time I access the section). Ofc it never gets the expected response... all the responses I get after a reload are just from sensors and other HA related calls, nothing related to the backups.

Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jan 17, 2024
@jmealo
Copy link

jmealo commented Jan 17, 2024

This is still an issue. Not stale.

@github-actions github-actions bot removed the stale label Jan 17, 2024
@PV-Joe
Copy link

PV-Joe commented Jan 18, 2024

Still can‘t see my backups.
Hope thy will fix it soon.

@jonnybergdahl
Copy link

Please fix this.

@jhemak
Copy link

jhemak commented Jan 22, 2024

+1

@ToXinE
Copy link

ToXinE commented Jan 30, 2024

This is still an issue with latest versions.

@jmealo
Copy link

jmealo commented Jan 30, 2024

Just placing some links to relevant source code in case I or someone else picks this up. I asked again on Discord and no contributors have shown any interest.

Proposed fix

Preventing the error condition

When writing a backup

  • Use findmnt or similar to make sure that the network mount is in a good state when creating/writing a backup.
  • If the mount is in a good state: proceed.
  • If the mount is in a bad state, and a fallback location is configured: write to the fallback location and raise a notice to the user that the last backup was written to the fallback location.
  • If the mount is in a bad state, and a fallback location is not configured: raise a notice to the user that the last backup failed to write.

Follow-up enhancement

  • Add option to copy backups from the fallback location when the mount is restored.

Recovering from the error condition

  • In the event that the mount point is a regular directory and contains valid backups, it should become the fallback directory, and a notice should be raised to the user that this has occurred.

Follow-up enhancement

  • Raise notice that backups are present in the fallback location but the option to copy them automatically has not been set up.

UI Fixes

  • Show fallback mount configuration guidance when network storage is the default destination and the mount fails (instead of showing the blank page). Explain how to setup robust backups with a transient storage server.

Links to relevant code bits

  • It looks like the mounts are managed using systemd rather than the mount command.

f"Cannot mount {self.name} at {self.local_where.as_posix()} because it is not empty",

https://github.com/home-assistant/core/blob/7fbfd446369b8ff4526a92a2018eb00da278e383/homeassistant/components/backup/manager.py#L47C2-L48C57

  async def async_pre_backup(self, hass: HomeAssistant) -> None:
        """Perform operations before a backup starts."""
        # We can likely do a check here to see if the directory is a mount, and whether the mount is in good status

https://github.com/home-assistant/supervisor/tree/main/supervisor/mounts

@jmealo
Copy link

jmealo commented Jan 30, 2024

Architecture discussion on a proposed fixed to the Network Storage issues:
home-assistant/architecture#1033

Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 29, 2024
@ToXinE
Copy link

ToXinE commented Feb 29, 2024

still an issue when lots of backups are present in the remote directory

@github-actions github-actions bot removed the stale label Feb 29, 2024
@FlorianWilk
Copy link

FlorianWilk commented Mar 15, 2024

Same issue here. Wasn't a problem in the past, but since a few days. guess @ToXinE idea might be valid.

Update: I had 25 Backups files on my shared network drive. In HA the Backup-list was empty.
Protocol said: Failed to to call /backups/reload -
Then i moved 15 of the old backups to a subdir (10 files left) and voila, Backups in HA are shown again.

@PV-Joe
Copy link

PV-Joe commented Mar 16, 2024

Haven‘t tested this myself yet but maybe it is better to use the advanced AUTO BACKUP integration from HACS to solve the problem?

https://jcwillox.github.io/hass-auto-backup/

@FlorianWilk
Copy link

Haven‘t tested this myself yet but maybe it is better to use the advanced AUTO BACKUP integration from HACS to solve the problem?

https://jcwillox.github.io/hass-auto-backup/

Yes, i do automatic backups - but using a custom script instead of the above integration. But in case you want to restore your backup, or just get an overview of existing backups, the list is useful.
Of course i could get an overview by looking at the NAS-Folder and restore could be done by deleteing/moving every other backupfile except the one you want to restore. But i think it would be much more comfortable to have the existing backup-list working as it should (and does, if you have < 15-20 files)

@elboletaire
Copy link

elboletaire commented Mar 16, 2024

Haven‘t tested this myself yet but maybe it is better to use the advanced AUTO BACKUP integration from HACS to solve the problem?

jcwillox.github.io/hass-auto-backup

That's what I use and, as said by Florian in the previous message, doees not help/affect to the issue.

@jonnybergdahl
Copy link

Listing the files should be a very fast operation, but problem occurs because the backend needs to open each and every tar file and read the details to be able to return a complete list to the GUI.
I am not familiar with how the communication between the GUI and the backdoor works, but returning data line by line might be a solution. Or return a list of files, and return detail data as it arrives.

@QTIPNL
Copy link

QTIPNL commented Apr 1, 2024

don't now if it helps. I had similar kind of symptom as described above.
I noticed a lot of network traffic on my NAS when opening the backup-screen in Home Assistant for a couple of seconds but not a single backup was shown on the screen even not after a couple of minutes.
even switching the backup location to local was not showing any result.
The network drive contained 170+ backups from all sizes. When (re)moving the tar files to another location on the NAS the previous created local files backup files instantly appeared on the backup page of home assistant and creating a newly backup on the network drive also appeared instantly.

Copy link

github-actions bot commented May 1, 2024

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 1, 2024
@PV-Joe
Copy link

PV-Joe commented May 1, 2024

The problem still persists.
Come on guys 😄

@github-actions github-actions bot removed the stale label May 1, 2024
@ledow
Copy link

ledow commented May 11, 2024

I have this same problem, it renders backups invisible to users and makes recovery far more difficult that necessary.

Can we not at least cache backups we know we made, and then test if they're still present only when they're accessed?

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