Updated wording from “snapshot” to “backup”.
Trying to restore a backup, download new docker image, connect to instance, but all I have is the standard create a new user dialogue, with no other links for restoring, etc.
What am I doing wrong??
Tried in several browsers, and have tried several times.
So, created user and went into the interface, but cannot find anywhere in there to restore, only to backup…
Help please.
Thanks, John.
These instructions are for Home Assistant OS.
Any chance of pointing me in the right direction?
Have searched the community, and can’t find anything to do with restoring…
There is no restore for a docker install. You can extract all the files from the backup /config folder (including hidden files) and copy them to your new install.
Seriously?
That’s fairly straight forward to enable backup/restore?
Why enable backup, if there is basically no simple way to restore?
Copy them to a new install – where?
Not trying to be difficult, but…?
The restore feature is only available in Home Assistant OS or Supervisor. Until recently the backup feature was only available there too. I’m not sure if a restore feature is planned for docker installs.
Copy them to your /config folder.
Sorry, but is there something, somewhere, that explains this process a little?
Thanks for your patience!!
The backup is a compressed archive. You can extract the contents with 7zip or similar.
Copy the the /config folder and its contents from the backup to your system /config folder and restart.
With all respect, having backup functionality without restore functionality is absurd, especially when the only advice I’ve found so far (as a newb) for migrating from Container to OS or from one machine to another is “do a backup and restore” (TBF, I may have stumbled upon a minority view).
Backup / restore is a basic function of any computer system, and must be as easy as possible because there are only two kinds of computer users: those who have had to restore a backup; and those who have not had to restore a backup yet.
This is the sort of thing that renders a system unusable by non-techies and undesirable for techies who value their time.
I’ve extracted the data from the .tar (obtaining a core_2022_10_4 directory), and then from the target.gz (obtaining a data directory) but there is no /config folder.
the data directory contains:
total 45144
drwxr-xr-x@ 18 evan staff 576 Oct 21 09:56 .
drwx------@ 6 evan staff 192 Oct 21 09:56 ..
-rw-r--r--@ 1 evan staff 6148 Oct 21 09:59 .DS_Store
-rw-r--r--@ 1 evan staff 9 Oct 17 16:13 .HA_VERSION
drwxr-xr-x@ 2 evan staff 64 Oct 17 16:13 .cloud
drwxr-xr-x@ 23 evan staff 736 Oct 20 17:04 .storage
-rw-r--r--@ 1 evan staff 518 Oct 18 17:05 automations.yaml
drwxr-xr-x@ 2 evan staff 64 Oct 20 17:04 backups
drwxr-xr-x@ 5 evan staff 160 Oct 21 09:56 blueprints
-rw-r--r--@ 1 evan staff 220 Oct 17 16:13 configuration.yaml
drwxr-xr-x@ 2 evan staff 64 Oct 17 16:13 deps
-rw-r--r--@ 1 evan staff 5779 Oct 19 04:47 harmony_12355857.conf
-rw-r--r--@ 1 evan staff 23080960 Oct 20 17:04 home-assistant_v2.db
-rw-r--r--@ 1 evan staff 0 Oct 20 17:04 home-assistant_v2.db-wal
-rw-r--r--@ 1 evan staff 0 Oct 17 16:13 scenes.yaml
-rw-r--r--@ 1 evan staff 0 Oct 17 16:13 scripts.yaml
-rw-r--r--@ 1 evan staff 161 Oct 17 16:13 secrets.yaml
drwxr-xr-x@ 3 evan staff 96 Oct 20 09:37 tts
Is that what you mean by “the /config folder”
That works, except for the detail that the historic data does not appear to have been restored.
So the basic mechanism to do a restore on HA Container is:
- decompress each level of the backup file
- move the folder containing ‘configuration.yaml’ to the pi (including hidden files and directories deep copied)
- move the restored data into the config directory of the container (docker, in this case)
- restart HA Container
Does not work for me.
What I did is extract the backup file.
This is the listing:
a0d7b954_bitwarden.tar.gz addons_local.tar.gz core_duckdns.tar.gz homeassistant.tar.gz ssl.tar.gz
a0d7b954_ssh.tar.gz backup.json core_nginx_proxy.tar.gz media.tar.gz
a0d7b954_wireguard.tar.gz core_configurator.tar.gz core_samba.tar.gz share.tar.gz
When I try to extract a *.tar.gz file I receive an error message.
% tar -xf core_duckdns.tar.gz
tar: Error opening archive: Unrecognized archive format
Reading through the forum I see the workaround is to store the backup without a password. If only I would have know earlier!!
This is a major setback, causing me possibly to loose valuable information. And, even worse, my trust in this project.
I have had a crash before and was able to restore my backup then. When loading HA for the first time an option was displayed to perform a restore, instead of creating a new HA instance from scratch.
It has been a couple of months since the previous reply. Is there a solution known to this issue?
issue: how to perform a restore of a password protected backup
Any help is appreciated.
Decrypt backup:
Extract and copy as explained above.
You need to add the ‘z’ parameter to uncompress the archive at the same time. I also add the ‘v’ parameter to get a verbose output and you can omit the hyphen if you want.
tar -zxvf core_duckdns.tar.gz
tar zxvf core_duckdns.tar.gz
I have a tip that may help someone to avoid wasted time and frustration.
I backed up my Generic x86-64 install to bare metal while it was early in the setup phase. Then as a test, did a restore. All went well so I started adding integrations, add-ons and a handful of devices. No problem until I got to Zigbee2MQTT. It refused to run. Some authentication problem. But Meross using the same MQTT broker was fine. Then, Samba and SSH … installed, but would not start.
The solution I found was really simple. I had just been doing the Developer Options restart. A full hardware reboot solved them all.
I have raised a new instance so I can upgrade python version.
I did a backup on the old instance.
Moved that backup into .homeassistant/backups/ on the new instance
Rebooted.
And now in the login screen doesn’t show up anything that allows to restore from a backup.
No “Alternatively you can…”
And System->Backups doesn’t also have any way of restoring.
Restoring a backup is not possible in HA anymore?
What installation method did you use?
See the table here and take particular note of the two footnotes. Depending on your install method you may have to do a manual restore, even though you can backup via the UI.
I have a Core installation, because I run it on a Proxmox Lxc container.
So I see that restore is only manual. In fact I’ve already done it the manual way.
In my case, as I’m moving from python 3.9 to 3.11, I’m concerned about the integrations and other components versions become “corrupt”.
For example, now I have the “SmartThinQ LGE Sensors” integration that I can’t load, even when I have redownloaded it. It complains about python dependencies:
Setup failed for custom integration smartthinq_sensors: Requirements for smartthinq_sensors not found: ['cchardet>=2.1.7'].
And
Unable to install package cchardet>=2.1.7: ERROR: Cannot install cchardet>=2.1.7 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
EDIT: I’ve already seen that this is a problem with the integration on python 3.11: dependency cchardet cannot be installed on python 3.11 · Issue #507 · ollo69/ha-smartthinq-sensors · GitHub
I don’t know if I’m getting more of those problems. I can see another complain in logs about ffmpeg folder not present.
I have a HAOS install, I do have google drive backup but it is two days old, but my local copy of backup is from yesterday. How can I retrieve it?
My issue was with new HAOS 10.0rc1, since updating it, HA is using too much ram upto 96% leading to very slow or non-responsive HA.