core icon indicating copy to clipboard operation
core copied to clipboard

Restore from backup not working anymore

Open criticallimit opened this issue 1 year ago • 39 comments

The problem

Tried to go back from Beta 2023.5... to my working 2023.4.4 Versions. Have daily backups but non of is restored anymore. Raspi disconnects from Network and after that nothing changes. Waited for 45 Minutes, but HA is not coming back. Unplug Power and repowering is bringing 2023.5.0b5 back. No Logs showing a problem with restore.

What version of Home Assistant Core has the issue?

2023.5.0b...

What was the last working version of Home Assistant Core?

2023.4.4

What type of installation are you running?

Home Assistant OS 10.1

criticallimit avatar Apr 30 '23 10:04 criticallimit

same here... 2023.5 (final) broke Ariston / BMW / Smartthings integrations all at once ! !

Oneshotblu avatar May 03 '23 21:05 Oneshotblu

@Oneshotblu this seems not to be the same issue, please open an own issue report

mib1185 avatar May 04 '23 06:05 mib1185

@mib1185 Actually it is the same issue, I tried to restore a backup because several integrations stopped working and I could not do it. The only difference is that I tried from 2023.5 final instead. Thank you.

Oneshotblu avatar May 04 '23 07:05 Oneshotblu

Having the same issue with restoring a backup. Want to move from my Debian 11 based HA Supervised install (2023.5.0) to HA OS 10 (2023.5.1.), both running on ProxMox as VM's. The backup file uploads fine in 2023.5.0 and .1, however restoring from full or partial (even 1 add-on or folder structure) does absolutely nothing. Tried restoring from the inital user prompt (after new VM HA install on ProxMox with bash-command) as well as after logging in from the GUI and by CLI command, both with same result. After waiting (first time even overnight) and rebooting, there is no change at all to the newly installed HA istance.

What is really frustrating is that there is no progress indication nor logging or communication from HA about restore status or what goes wrong.

Going to try to load a previous version (2023.4, if I can find out how..) as a VM on ProxMox and see if that allows restoring a backup, and if so update from there..

SynoUser-NL avatar May 05 '23 18:05 SynoUser-NL

Downloaded haos 9.5 version and installed this as a ProxMox VM. Result after 1 hour: image

VM CPU is constant at about 25% DiskIO is negligable..

SynoUser-NL avatar May 05 '23 19:05 SynoUser-NL

agree!

We are all doing backups to restore when updates are going wrong. To be not able to do the restore because of the update is frustrating and a no go. just my 2 cent

criticallimit avatar May 05 '23 20:05 criticallimit

Same issue overhere., Tried to restore a PI based config to a x64 based system to get better performance: no go. No logging, it just disconnects after the restore starts. Have been able to restore from PI to PI before without any problem.

jjvandenberg avatar May 10 '23 19:05 jjvandenberg

I installed HAOS9.5 on ProxMox. From there I restored a 4 month old backup (without updating Core or OS), then restored the recent backup. The first restore took almost 12 hrs (1.5 GB file), the second recent one a couple of hours short of a day (with a 1.8GB restore file). After that, with all entities restored and a bit of history missing, all appeared well.. Then upgraded HAOS (10.1). Don't know if this makes any sense, but that is wat appeared to work for me.

Backup\Restore is a shoot-and-hope-you-don't-die process as it is now, and in dire need of some love & attention.

SynoUser-NL avatar May 11 '23 11:05 SynoUser-NL

I upgraded to 2023.5.x and after several failed attempts was able to revert to 2023.4.6 because of multiple broken integrations. Now I can restore anything from backup even with 2023.4.6. Home Assistant core crashes and I'm left with a running VM.

mlg9000 avatar May 13 '23 15:05 mlg9000

Issue still occurs in 2023.5.4 :-( However: after leaving it for about 3 hours, it seems to have restored the full config. No idea why a small config of about 200 Mb takes 3 hours ..

jjvandenberg avatar May 24 '23 08:05 jjvandenberg

Has anyone found a workaround? Mine has been offline for a week or two while waiting for a way forward.

stephenyeargin avatar May 28 '23 14:05 stephenyeargin

This is probably also related.

Manual Restore Steps I performed and worked:

  1. I've used a Live boot Linux to browse the SD Card and copied the backups from there (if you got a backup file you can use skip this)
  2. I've reinstalled my Home Assistant and created a User.
  3. installed the Advanced SSH & Web Terminal add-on, and set User to "root" and SFTP to "true" (Check log if start fails)
  4. now i copied the files out of the backup tar ball (Backupxyz.tar.\homeassistant.tar.gz\homeassistant.tar\data) into the config folder per SFTP (/config/) and overwrite existing files in there
  5. Fully reboot the host
  6. To get your add-on back: Go into the WEB UI and upload your backup, restore the Partial backup and exclude "Home Assistant"
  7. Done

This is absolutely an awful way to restore and should only be used in the worst case like this issue. Hope restoring will be fixed soon.

RevLaw avatar Jun 09 '23 07:06 RevLaw

I am adding to this as I seem to have same issue. Trying to move from a VM in UNRAID to Pi 4/4Gb with USB SSD. Install works fine but then trying to restore from backup, either as part of onboarding or via cli just seems to hang. I have a large backup of 1.23Gb so have left it for a while. The last entry in the Supervisor logs is Restore folder SSL and then nothing. The UI stops working (8123) although I can still connect on observer and it all appears green. This is somewhat frustrating, not had issues this critical in a while with HomeAssistant and I have been a user since the very start.

smith844 avatar Jun 18 '23 14:06 smith844

Problem still exists in 2023.6.3

Same behavior. After executing, it starts, disconnects the connection, and disappears into the nirvana. RPi4 powered off after 30 minutes. Afterwards, it boots without having performed the restore. No errors in the log.

criticallimit avatar Jun 25 '23 09:06 criticallimit

Unable to restore backup. The same behavior as decsribed above. Using putty client, got "ha core logs". Screenshot attached:

image

And - silence

HA info:

image

polsup2 avatar Jul 02 '23 21:07 polsup2

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)

home-assistant[bot] avatar Jul 17 '23 01:07 home-assistant[bot]

Hello guys,

Same here with HAOS @ Vmware VM.

image

those are the only logs i can check using Ha CLI ¿Is there any way to save more logs?

javigmsuperka avatar Jul 20 '23 22:07 javigmsuperka

still not working on 2023.8.0b1

criticallimit avatar Jul 29 '23 09:07 criticallimit

Can't restore 2023.7.x either. Tried clean install and upload backup.tar later to restore. After pressing the restore button the webdashboard disconnects (assuming it's doing it's restore thingie) but even after a night sleep over nothing seems to happen (tried many times, also older backups)...after taking power of then...it just reboots like nothing happened.

My historical database is 10GB don't want to loose it. Should't be that big of a problem?

Wish there was some indication of what's going on...

Using regular RPI4 with Home Assistant Operating System.

ghost avatar Aug 02 '23 09:08 ghost

I cant restore my 1.9 GB Backup, too. Now I try to clone the data partition. Stay fingercrossed! I'd just run out of storage and I never had problems with restoring backups and now it's not possible in some cases anymore? I think its a very critical issue!

panhans avatar Aug 08 '23 18:08 panhans

completely agree this is the issue. backup and restore are essential in any program. please resolve this problem quick.

jocamane avatar Aug 08 '23 20:08 jocamane

For those who want to stay on the same platform and, for example, only migrate to a larger hard drive like me:

  1. Install home assistant to your new drive, start it login once with throw away credentials
  2. shut down system
  3. take your old drive and the new one and connect it to a linux system
  4. Figure out the mounting points for your hass-os-data partitions (new and old one), e.g. by right click in the file browser. (e.g. /dev/sdc8)
  5. clone the old data partition in the new one sudo dd if=/dev/old of=/dev/new bs=10000000 (replace the paths with your mount points)
  6. Wait until its done (my 128GB partition took me 30 min )
  7. unmount the the data partition umount /dev/new
  8. check the file system sudo e2fsck -y /dev/new
  9. resize the data partition sudo resize2fs /dev/new
  10. connect your new disk to your system, boot it up and everything should be like before

//EDIT: Maybe its easier with belena edger. You can easily clone partitions with that tool. //EDIT2: Ok, I had partition errors with my first method. First it worked well. After a while ha went down. BelenaEdger deletes the other partitions. So this isn't a solution either.

panhans avatar Aug 09 '23 06:08 panhans

thanks for the explanation and help. Thank you very much, but in the 21st century there has to be a more expeditious method that most users can do. Any software MUST have a backup/restore to work well. It's the basics

it's my opinion, of course

jocamane avatar Aug 09 '23 18:08 jocamane

Yes, it was and it is an essential feature. I do scheduled backups every 3 days and now I want to restore one and it doesn't work. I don't even know if this problem / bug is in focus of developers or is it just a problem of a few users?

panhans avatar Aug 10 '23 08:08 panhans

This is probably also related.

Manual Restore Steps I performed and worked:

  1. I've used a Live boot Linux to browse the SD Card and copied the backups from there (if you got a backup file you can use skip this)
  2. I've reinstalled my Home Assistant and created a User.
  3. installed the Advanced SSH & Web Terminal add-on, and set User to "root" and SFTP to "true" (Check log if start fails)
  4. now i copied the files out of the backup tar ball (Backupxyz.tar.\homeassistant.tar.gz\homeassistant.tar\data) into the config folder per SFTP (/config/) and overwrite existing files in there
  5. Fully reboot the host
  6. To get your add-on back: Go into the WEB UI and upload your backup, restore the Partial backup and exclude "Home Assistant"
  7. Done

This is absolutely an awful way to restore and should only be used in the worst case like this issue. Hope restoring will be fixed soon.

I tried to restore the system for two days - I cursed everything! Ubuntu, Balena, HaOS, Debian 11, Debian 12, in a container, without a container, then dancing with a backup for another day - and so I didn’t really achieve a normal configuration, but it turns out you could just unpack the backup and restart... kmp! Thanks, dude!

Ucsus avatar Aug 16 '23 12:08 Ucsus

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 Home Assistant 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.

Afaiac this issue is not resolved. Restoring a backup takes way too much time. On a i5-T7500 SSD proxmox system a restore of HAOS from a HA full backup takes about 1.5 day. With no guarantee it will work properly after that or that the restore won't just stop without any warning. This needs to be addressed by developers.

SynoUser-NL avatar Nov 16 '23 15:11 SynoUser-NL

Yes, for me it´s not working. Waiting more than 4 hours with nothing happens, I reset my Raspi. Tried several times on several Core versions. No longer working since 2023.4

criticallimit avatar Nov 16 '23 15:11 criticallimit

I have the 200MB database and last restore during 3 hours, but finish ok. It was important to have a feedback bar during the backup

jocamane avatar Nov 16 '23 19:11 jocamane

Mi old raspi pi 4 takes one day to restore a 250mb backup. My mini pc with an n100 only needs half an hour.

panhans avatar Nov 16 '23 22:11 panhans