supervisor icon indicating copy to clipboard operation
supervisor copied to clipboard

Can't Restore my backup on a new machine

Open twanjaarsveld opened this issue 1 year ago • 9 comments

Describe the issue you are experiencing

After wanting to move to a different system i installed HA OS on it and made a backup from my up-to-date system but it doesn't seem to work, i know its possible because i did it many times before. Screenshot 2024-01-09 204741

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Steps to reproduce the issue

1.Make a backup (mine was 1.8gb big) 2.install the latest Home Assistant OS on a new machine 3.after it installs select (restore from backup) 4. wait for many hours as it wont do anything

Anything in the Supervisor logs that might be useful for us?

Started busy box

System Health information

Using home assistant observer it shows everything to be healty

Supervisor diagnostics

No response

Additional information

No response

twanjaarsveld avatar Jan 09 '24 19:01 twanjaarsveld

I had similar (but may not be the same as this ticket does not have much detail).

I gave up and did this:

  • set it up as a blank setup
  • enabled andvanced mode (so I could see supervisor logs
  • then tried a full backup restore

Got these logs: 24-01-12 09:24:05 ERROR (MainThread) [supervisor.backups.manager] Backup was made on supervisor version 2023.12.1.dev2104, can't restore on 2023.12.0. Must update supervisor first.

This tells me that me "pre-christmas" attempt to get Raspberry Pi 5 working (where I updated to the dev version of 2023.12.1) has broken my backup and restore ability.

I tried downgrading my RPi4 HA supervisor, but that didn't work.

For some reason 2023.12.1 isn't available to fresh installs, despite being listed as a release?

jwheeler91 avatar Jan 12 '24 09:01 jwheeler91

FYI, I found 2023.12.1 by updating the supervisor to use beta channel. Then my restore worked. Obviously I don’t know if you’re seeing the same thing as I was, because you didn’t put any logs up

jwheeler91 avatar Jan 12 '24 22:01 jwheeler91

I was going to post this, your workaround worked for me too - so thank you. Here is my write-up for reproducing this issue:

  1. Tried to restore full and partial backups but it kept not succeeding
  2. Upload to HA was succesful (no errors)
  3. Checked the request to http://homeassistant.local:8123/api/hassio/backups/be7a8382/restore/full - this gave a response of:
{
	"result": "error",
	"message": "Unknown error, see supervisor"
}
  1. I installed clean HA, set-up with defaults and attempted to restore, got the following error: 24-01-12 20:42:12 ERROR (MainThread) [supervisor.backups.manager] Backup was made on supervisor version 2023.12.1, can't restore on 2023.12.0. Must update supervisor first.

  2. Modified the backups.json file within the tar.gz file to have a supervisor value of 2023.12.0 (instead of 2023.12.1).

  3. I was then able to re-attempt a restore with no issues.

The actual error here is that when there is a newer version of the supervisor identified as being required following a backup restore, the onboarding process does not download the new supervisor and just hard fails instead. I think this is meant to happen under the hood but in practise it doesn't seem to. If not, it should at least prompt the user that a supervisor upgrade and reboot is required first.

codyc1515 avatar Jan 14 '24 03:01 codyc1515

The problem here is that backups from newer supervisors cannot be installed on older supervisors. This is fine so far.

Jan 14 09:23:38 homeassistant hassio_supervisor[570]: 24-01-14 10:23:38 INFO (MainThread) [supervisor.backups.manager] Successfully imported 28fde29b
Jan 14 09:23:47 homeassistant hassio_supervisor[570]: 24-01-14 10:23:47 ERROR (MainThread) [supervisor.backups.manager] Backup was made on supervisor version 2023.12.1, can't restore on 2023.12.0. Must update supervisor first.

In my case i need supervisor 2023.12.1 which should be installed automatically but is not installed automatically.

# ha supervisor update
Error: No supervisor update available - 2023.12.0

If I switch to the beta channel (mentioned by @jennettwheeler ), the required supervisor can be installed and then the backup can be restored.

# ha supervisor options --channel=beta
Command completed successfully.
# ha supervisor reload
Command completed successfully.
# ha supervisor update
Command completed successfully.
Jan 14 09:29:24 homeassistant hassio_supervisor[570]: 24-01-14 10:29:24 WARNING (MainThread) [supervisor.backups.manager] Backup 28fde29b already exists! overwriting
Jan 14 09:29:24 homeassistant hassio_supervisor[570]: 24-01-14 10:29:24 INFO (MainThread) [supervisor.backups.manager] Removed backup file 28fde29b
Jan 14 09:29:24 homeassistant hassio_supervisor[570]: 24-01-14 10:29:24 INFO (MainThread) [supervisor.backups.manager] Successfully imported 28fde29b
Jan 14 09:29:34 homeassistant hassio_supervisor[570]: 24-01-14 10:29:34 INFO (MainThread) [supervisor.backups.manager] Full-Restore 28fde29b start
.
.
.
Jan 14 09:37:01 homeassistant hassio_supervisor[570]: 24-01-14 10:37:01 INFO (MainThread) [supervisor.backups.manager] Full-Restore 28fde29b done

So the main problem seems that needed supervisor 2023.12.1 can't be find/installed automatically.

Baxxy13 avatar Jan 14 '24 10:01 Baxxy13

That’s my understanding too, although for whatever reason I don’t think it showed till I went on beta channel.

codyc1515 avatar Jan 14 '24 10:01 codyc1515

I think PR #4791 should handle this more gracefully (as in, it should print a sensible message during onboarding). However, the problem remains that we disallow restoring a backup from the beta channel. The work around currently is to go through full onboarding, then change to beta channel and then restore the backup.

/cc @mdegat01 I've hinted at that problem during review. I think it mostly appearing now because we had quite some folks having to reinstall due to update problems on Raspberry Pi 5 (which initially required people to be on beta/dev channel) :cry:

agners avatar Jan 15 '24 12:01 agners

Is it expected that Supervisor 2023.12.1 is only available through beta?

I understand not wanting to permit down grades 100% - I experienced issues with the schema mapping when I changed the version in my backup file - so I agree with your position. But surely we should permit upgrades?

Does the most recent version show an error if that case is encountered? I'm keen to test the latest supervisor functionality in a beta.

codyc1515 avatar Jan 15 '24 18:01 codyc1515

Yep, looks like 2023.12.0 is the stable version (not 2023.12.1). The changes made in #4791 look like what I was going to tackle, so I think this issue will be solved with the next beta (alongside my other changes in https://github.com/home-assistant/frontend/pull/19389).

codyc1515 avatar Jan 16 '24 08:01 codyc1515

This should be fixed now.

codyc1515 avatar Feb 10 '24 09:02 codyc1515

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[bot] avatar Mar 11 '24 10:03 github-actions[bot]