Need help recovering an old config - old images available?

My SD card is nuked.

Last time I did a FULL back up was April 2019 as my system was doing just what I wanted it to and I didn’t need to make any changes, so I didn’t bother with updates (if it aint broke…).

But now it is broke.

I’m in a pickle as I cannot use that old full restore with the latest HASS.IO image, I need to be able to install the older version, restore my backup and then update everything to the newer version.

I even tried imaging my old SD card and then flashing that image to a new one, but no luck.

Are there archived images I can access to flash a new card, restore my old backup and then bring up to date?

Please say yes as I have weeks and weeks of config on that system that was working so nicely until my SD card took a dump.

When you say backup do you just mean a snapshot? If it’s a snapshot you can just unzip it.

1 Like

I took a full snapshot yes, but I am not sure how to restore it. I tried doing it on a brand new image but it didn’t work. I’m working on a windows machine and not very experienced with Linux.

Just unzip it. It will be filled with more zip files but you can unzip them as well. The Homeassistant.gz.tar (I think is the name) will have your whole config directory in it. I assume you tried just restoring the backup? That should work as well.

Not sure that I am following.

I got a new SD card, used balenaEtcher to image it from the URL provided in the Home Assistant setup instructions then when I got to the account creation page I used the ‘restore from backup’ option to select the zip file of the 2019 full backup and upload it but it didn’t seem to work.

It can take maybe 20-30 minutes to restore the backup. Depends on the hardware. You need to be patient. start it running and go out for an hour. It won’t actually look like it’s doing anything. I don’t even think it notifies you when you are done.

1 Like

Thank you for all of your help I really appreciate it.

OK I will give that a try and see how it goes.

Yeah restoring from backup during onboarding leaves a lot to be desired. I did this when switching to new hardware recently. Once uploaded you get no feedback until the system is up. Which can be a problem if it does not come up.

Connecting a monitor to the Pi via the HDMI connector can give some info but the best option is to flash a new install, create a dummy account (it will be over written by the backup) then install the backup from the Supervisor / Backup page.

I’m pretty sure the problem isn’t that the back up won’t restore. Its that the system is trying to restore a config that is 2 or 3 years old onto the latest HA build.

I don’t know if there are any images that old you can find but you can hopefully load a clean copy of HA OS and then do an “update” to the older version of HA you were on previously then restore your back up onto that system.

Then you can start going thru the update process and fixing all of the huge amount of breaking changes in the last few years.

TBH, it might just be easier to start over from scratch at that point.

No because as part of the restore it will pull the old image. It’s simply patience required as I posted. Worst case is he can just manally unzip the home assistent folder to /config but the snapshot should and will restore if you just leave it alone.

1 Like

Reporting in. Bringing in the full older backup did have some limited success as I am now able to log in with my old account details and see that all my config is at least there. I have a newer partial backup from dec 2021 that I can bring in but it does look like there will be some repair work to do also.

Better than having to build my entire config from scratch though.

Now I have to face the repairs listed in the logs

2022-03-08 05:57:35 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/scenes.yaml contains duplicate key “light.theater_columns_all”. Check lines 35 and 50

2022-03-08 05:57:40 WARNING (MainThread) [homeassistant.components.lovelace] Resources need to be specified in your configuration.yaml. Please see the docs

2022-03-08 05:57:47 ERROR (MainThread) [homeassistant.config] Platform error: sensor - Integration ‘yr’ not found.

2022-03-08 05:57:48 ERROR (MainThread) [homeassistant.config] Invalid config for [scene]: State for media_player.denon_6300h should be a string for dictionary value @ data[‘states’][0][‘entities’]. Got None. (See /config/scenes.yaml, line 204). Please check the docs at Scenes - Home Assistant

2022-03-08 05:57:48 ERROR (MainThread) [homeassistant.config] Invalid config for [scene]: State for media_player.denon_6300h should be a string for dictionary value @ data[‘states’][0][‘entities’]. Got None. (See /config/scenes.yaml, line 209). Please check the docs at Scenes - Home Assistant

2022-03-08 05:57:48 ERROR (MainThread) [homeassistant.config] Invalid config for [scene]: State for media_player.denon_6300h should be a string for dictionary value @ data[‘states’][0][‘entities’]. Got None. (See /config/scenes.yaml, line 214). Please check the docs at Scenes - Home Assistant

2022-03-08 05:57:52 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Z-Wave for zwave

Traceback (most recent call last):

File “/usr/local/lib/python3.9/site-packages/openzwave/option.py”, line 78, in init

raise ZWaveException(u"Can’t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))

openzwave.object.ZWaveException: “Zwave Generic Exception : Can’t find device /dev/ttyACM0 : [‘NoneType: None\n’]”

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 335, in async_setup

result = await component.async_setup_entry(hass, self)

File “/usr/src/homeassistant/homeassistant/components/zwave/init.py”, line 402, in async_setup_entry

options = ZWaveOption(

File “/usr/local/lib/python3.9/site-packages/openzwave/option.py”, line 81, in init

raise ZWaveException(u"Error when retrieving device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))

openzwave.object.ZWaveException: ‘Zwave Generic Exception : Error when retrieving device /dev/ttyACM0 : [‘Traceback (most recent call last):\n’, ’ File “/usr/local/lib/python3.9/site-packages/openzwave/option.py”, line 78, in init\n raise ZWaveException(u"Can\‘t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))\n’, ‘openzwave.object.ZWaveException: “Zwave Generic Exception : Can\'t find device /dev/ttyACM0 : [\‘NoneType: None\\\\n\’]”\n’]’

2022-03-08 05:57:52 ERROR (MainThread) [homeassistant.setup] Setup failed for introduction: Integration not found.

2022-03-08 05:57:55 WARNING (MainThread) [homeassistant.components.broadlink.switch] The ‘host’ option near /config/switch.yaml:25 is deprecated, please remove it from your configuration

2022-03-08 05:57:55 WARNING (MainThread) [homeassistant.components.broadlink.switch] The ‘type’ option near /config/switch.yaml:25 is deprecated, please remove it from your configuration

2022-03-08 05:57:55 ERROR (MainThread) [homeassistant.config] Invalid config for [switch.broadlink]: [friendly_name] is an invalid option for [switch.broadlink]. Check: switch.broadlink->friendly_name. (See /config/switch.yaml, line 25). Please check the docs at Broadlink - Home Assistant

2022-03-08 05:57:58 WARNING (MainThread) [homeassistant.components.nest.legacy] The Legacy Works With Nest API is deprecated and support will be removed in Home Assistant Core 2022.5; See instructions for using the Smart Device Management API at Nest - Home Assistant

2022-03-08 05:57:58 ERROR (MainThread) [homeassistant.components.media_player] The denonavr platform for the media_player integration does not support platform setup. Please remove it from your config.

2022-03-08 05:58:01 ERROR (SyncWorker_0) [homeassistant.components.nest.legacy] Connection error while access Nest web service: Authorization Failed

2022-03-08 05:58:04 ERROR (MainThread) [homeassistant.components.kodi.config_flow] Cannot connect to Kodi

Traceback (most recent call last):

File “/usr/local/lib/python3.9/site-packages/jsonrpc_async/jsonrpc.py”, line 33, in send_message

response = await self._request(data=message.serialize())

File “/usr/local/lib/python3.9/site-packages/aiohttp/client.py”, line 634, in _request

break

File “/usr/local/lib/python3.9/site-packages/aiohttp/helpers.py”, line 721, in exit

raise asyncio.TimeoutError from None

asyncio.exceptions.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “/usr/local/lib/python3.9/site-packages/pykodi/kodi.py”, line 164, in ping

response = await self._server.JSONRPC.Ping()

File “/usr/local/lib/python3.9/site-packages/jsonrpc_async/jsonrpc.py”, line 35, in send_message

raise TransportError(‘Transport Error’, message, exc)

jsonrpc_base.jsonrpc.TransportError: (“Error calling method ‘JSONRPC.Ping’: Transport Error”, TimeoutError())

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/components/kodi/config_flow.py”, line 52, in validate_http

await kodi.ping()

File “/usr/local/lib/python3.9/site-packages/pykodi/kodi.py”, line 170, in ping

raise CannotConnectError from error

pykodi.kodi.CannotConnectError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/components/kodi/config_flow.py”, line 229, in async_step_import

await validate_http(self.hass, data)

File “/usr/src/homeassistant/homeassistant/components/kodi/config_flow.py”, line 54, in validate_http

raise CannotConnect from error

homeassistant.components.kodi.config_flow.CannotConnect

2022-03-08 05:58:20 ERROR (MainThread) [homeassistant.components.light] The flux_led platform for the light integration does not support platform setup. Please remove it from your config.

2022-03-08 05:58:24 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py”, line 74, in _async_process_pending_flows

await gather_with_concurrency(

File “/usr/src/homeassistant/homeassistant/util/async_.py”, line 192, in gather_with_concurrency

return await gather(

File “/usr/src/homeassistant/homeassistant/util/async_.py”, line 190, in sem_task

return await task

File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 203, in async_init

flow, result = await task

File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 230, in _async_init

result = await self._async_handle_step(flow, flow.init_step, data, init_done)

File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 325, in _async_handle_step

result: FlowResult = await getattr(flow, method)(user_input)

File “/usr/src/homeassistant/homeassistant/components/octoprint/config_flow.py”, line 144, in async_step_zeroconf

uuid = discovery_info.properties[“uuid”]

KeyError: ‘uuid’

2022-03-08 05:58:33 WARNING (Thread-8) [matplotlib.font_manager] Matplotlib is building the font cache; this may take a moment.

Oh, I didn’t know that. I just thought it put the backed up config into the current version.

thanks. :slightly_smiling_face:

Thanks to the help here I have almost completely recovered my old config and brought it all up to date :smiley:

I do have one card that doesn’t want to play nice and I am not sure why. I have the custom tiles-card installed, verified my entity exists and the name matches, not sure what this error means in Lovelace…

Finally got everything back online and all updated, even added some new functionality so it was worth diving back in.

Thank you everyone who contributed to this thread.