Backups apparently no good

I am in the midst of trying to restore my hassio Raspberry Pi 3B+ after a failed update has left it inoperable. So far things are not going well because after trying to restore my snapshots the pi is unreachable. After reading about methods of manually restoring from a snapshot I am worried that my backups are not complete and thus worthless. Here are the contents of one of my snapshots:

drwx------@  14 jsteinme  staff        448 Mar 27 09:38 .
drwx------+ 443 jsteinme  staff      14176 Mar 27 10:33 ..
-rw-r--r--@   1 jsteinme  staff       1008 Mar 26 02:00 8aef3602_dropbox_upload.tar.gz
-rw-r--r--@   1 jsteinme  staff        960 Mar 26 02:00 a0d7b954_airsonos.tar.gz
-rw-r--r--@   1 jsteinme  staff       1344 Mar 26 02:00 a0d7b954_nodered.tar.gz
-rw-r--r--@   1 jsteinme  staff        160 Mar 26 02:00 addons_local.tar.gz
-rw-r--r--@   1 jsteinme  staff       1232 Mar 26 02:00 core_configurator.tar.gz
-rw-r--r--@   1 jsteinme  staff       1056 Mar 26 02:00 core_samba.tar.gz
-rw-r--r--@   1 jsteinme  staff       4512 Mar 26 02:00 core_ssh.tar.gz
-rw-r--r--@   1 jsteinme  staff  280798272 Mar 26 02:07 homeassistant.tar.gz
-rw-r--r--@   1 jsteinme  staff        160 Mar 26 02:00 share.tar.gz
-rw-r--r--@   1 jsteinme  staff       1534 Mar 26 02:07 snapshot.json
-rw-r--r--@   1 jsteinme  staff        160 Mar 26 02:00 ssl.tar.gz

There are no .yaml files listed which makes me think that the backup is incomplete. Also, the contained .tar.gz files cannot be extracted by any means I have tried so far. Are these snapshots just garbage?

Thanks

Maybe your previous snapshots is incompleted or it breaks, that’s why you are facing problem, try older snapshots than previous backup and check

The yaml files are in one of those compressed data files, possibly homeassistant.tar.gz. They used compressed files to minimize snapshot sizes.

I apologize for my ignorance and unfamiliarity and appreciate the feedback.

@anon34565116 Thank you, I discovered that as well so I am feeling more confident that my snapshots are not corrupt. Though on OSX I can expand the snapshot .tar.gz files, I have not yet been able to expand the inner .tar.gz files. I suspect they are not corrupt because I was able to do a partial restore with a fresh install of hassio.

My current state is that I was able to do a partial restore from a snapshot and see it complete successfully in the system log. But once I rebooted the pi was unresponsive again. I suspect that a file is corrupt inside the snapshot so I am going to try selectively restoring parts of the snapshot to see if I can get farther.

Thanks

I actually did a restore a couple of days ago aswell, complete snaps successful restore.
For me it took hours to restore (i save some data for a longer time in the database).
depending on how big your snaps are, perhaps it could be taking longer time than expected?
Just as a thought from my experience :slight_smile:

Thanks, I think the time to restore was tripping me up at first given the lack of much feedback UI. I found that waiting long enough and viewing the logs will show you when the restore is finished and there is a popup in the UI to indicate the restore is complete.

I restored fewer items this time and the pi has once again stopped showing the web UI. This time I thought ahead and copied the config folder before rebooting. So now I think I am going to have to try manually restoring the config folder after a fresh install.

sadface, sounds like you have some work ahead of you.
Good luck.

Since OSX is based on Unix you should have the tar command, and likely gzip. Ideally this would work, for instance: tar -xzvf homeassistant.tar.gz.
Otherwise it may be a 2 step process:
gunzip homeassistant.tar.gz.
tar -xvf homeassistant.tar.

Sometimes gunzip is named unzip.

@anon34565116 Thanks. tar -xzvf homeassistant.tar.gz gives me an error on OSX 10.14.3 and I have not yet tried the 2 step process you mentioned. Now that I have the files copied from the restore of the snapshot I hope I am good to go though it would be nice to know how to extract them directly.

By manually restoring the config folder and fixing an error I was able to get things mostly running. The issue I ran into was my use of legacy_api_password :

2019-03-27 13:57:38 ERROR (MainThread) [homeassistant.auth.providers] Invalid configuration for auth provider legacy_api_password: required key not provided @ data['api_password']. Got None
2019-03-27 13:57:38 ERROR (MainThread) [homeassistant.config] Invalid config for [homeassistant]: required key not provided @ data['api_password']. Got None. (See /config/configuration.yaml, line 2). 
2019-03-27 13:57:38 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1115, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service persistent_notification.create not found')

I removed the whole auth_providers entry in my config file and I was able to get to the web UI. Not a fun process.

Thank you to everyone for your help.

1 Like