supervisor: Restoring from Backup broken (full or partial) from both Onboarding page and CLI
Describe the issue you are experiencing
Hi,
restoring from a backup (full or partial) seems to be broken. i have made a full backup and tried to restore it on a RPI3b+ (coming from 3b) i have tried restoring it from the onboarding screen (full and partial) on both accounts HA loses connection and nothing happens. the CLI shows nothing. i tried restoring a backup from the CLI (with “backups restore” ) but it finishes in about a second. (that should not happen) i also verified if any of the files in the /mnt/supervisor folder had changed or if any of the addons had been restored from the backup. i can confirm that not a single file has been changed after trying to restore the backup.
there are no logs, and i tried to restore a backup from CLI with a debug logging active, but that does not tell me anything. It looks like the restore actions from any backup are broken. please look into this, as this is a very bad thing for us all.
What operating system image do you use?
rpi3-64 (Raspberry Pi 3 64-bit OS)
What version of Home Assistant Operating System is installed?
Home Assistant OS 10.1
Did you upgrade the Operating System.
No
Steps to reproduce the issue
- create backup within supervisor on raspberry pi3b
- download backup to computer
- start the newly imaged RPI3b+
- on the onboarding screen choose “restore from backup”
- try restoring backup (process does not appear to do anything, can run forever, nothing changes) …
Anything in the Supervisor logs that might be useful for us?
there is nothing in the logs as supervisor is not yet running at the time of a onboarding restore
Anything in the Host logs that might be useful for us?
this is not accessible as it is not yet running at the time off a onboarding restore
System information
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 81 (4 by maintainers)
Tested by myself backup/restore on Pi4B Testsystem (SSD-Boot) (HA-OS 11.2 / supervisor-2023.11.6 / core-2023.12.2 / 7 addons / HACS with 3 custom integrations / backup size ~ 53MB)
Flashed HA-OS 11.2 to new ssd, waited for onboarding and uploaded my backup directly
full restore log:
The restore took around 8-9 minutes. I had to refresh the “onboarding restore page” to get into homeassistant. Don’t know if it’s eventually self changing from “restoring animation” to homeassistant, but i think not.
In homeassistant everything is there but something is wrong. All addons are shown as stopped in the addons overview and i can’t access them through the side panel. If i look in the addon details i see that they are all running.
I had to reboot ha to get back everything to normal.
In general, restore a full backup works for me.
Not fixed, I uploaded a full backup from a proxmox to a NUC and it’s stuck. CPU it’s at 100%
Exactly this. So unless one of us (users) is interested in fixing, no one else is going to take it upon themselves to solve.
Great point.
It would be necessary for someone to really want to solve this problem. Right now everyone is whistling into the air
I’m having the same issues - some - but not all - full backups are unrestorable. I have only been restoring from the GUI, so I have no idea what stage it’s stuck at. But when it occurs, HA is not listening on port 8123, even after waiting a very long time (hours). As far as I can tell, there is a pattern : when the tar ball exceeds around 500MB, that’s when the problem with restores start showing up. My sqlite history database reaches that size in about 7-10 days given the number of devices and sensors I have. “fortunately” the history database corrupts itself and resets to 0 in approximately that time frame (that’s another separate problem I have yet to file an issue on) so the subsequent backups become smaller. I would really appreciate some help with this. I have several unrestorable backups I can test if there is a tentative fix.
Just to follow up from my prior comment; all my restore attempts (I had 4 VMs trying to restore various recent backups) seemingly succeeded. Specifically, my “restore the
50MBbackup namedCURRENT_BACKUP” (number 5 in prev comment) was successful; in a more-recently-created VM w/ 4 cores (2.0GHz) and 8GB RAM, restoring theCURRENT_BACKUP(50MB) file took ~4.5hrs (4hr 27min; calculating betweenFull-Restore 184bd6e2 startandFull-Restore 184bd6e2 done; see logs below).Of the ~4.5 hrs, about 4.33 (4hr 20min) was spent strictly between
Restoring 184bd6e2 Home Assistant CoreandRestore Home Assistant Core config folder; looking at the currentmainbranch (git hash for future ref here), something(s) in the below code (marked w/ IJ breakpoint - a red dot in the gutter) is taking a lot longer than previously (specifically, between the log line"Restoring %s Home Assistant Core"inmanager.py, calling intobackup.py, and then the subsequent log line"Restore Home Assistant Core config folder"inmodule.py).Given my previous comment about (1) my
1153MBbackup file from ~3 weeks ago (from version2023.6.3) and (2) my50MBbackup file from yesterday (from version2023.8.4) being so drastically different in size, I’m a bit suspect it might be related to some of the tar extract code (the only other calls I see unrelated to tar extraction is the call toawait self.sys_homeassistant.core.stop()which I suspect should be relatively fast). The only recent change I see in these lines is https://github.com/home-assistant/supervisor/issues/4229 , which changes the buffer size from the default of10240(10KB) to4194304(4MB).My Yellow took 6 hours. Give it time
Same problem here. After the last update my system is brocken. I can use it for 1 to 2 minutes and then it loses parts of itself. The scrollbar disappears, I can no longer look at the logs,… Oddly enough, some of my light switches still work. When I try to restore a backup, nothing happens. Even after a new installation, I can’t restore a backup. home-assistant_2023-05-17T19-45-23.099Z.log