DarkPatch
(Dark Patch)
January 5, 2025, 2:38am
1
I recently onboarded a Proxmox server, and so after watching the 2025.1 Release party issue, I thought I would give it a try at doing a Backup / Restore.
Steps taken:
*After it had been installed, I opened in my browser and was presented with an option with ‘RESTORE FROM BACKUP’
Exported from my backup on my RasPi
Moved my existing pi to a new IP. ( Renamed it with -old to make sure it didn’t conflict. )
Began the Restore, but it hung on the screen: Restore in progress
Going to the URL using the name it received form being restored, fails over http. Using https, it loads to https://homeassist.benandtoni.com:8123/lovelace but just shows ‘Loading Data’ and continually going to Retry Now.
The easiest solution I think at this point would be for me to destroy the VM and restart the automation, configure it and then restore what I’m missing. With that said, as this is a new feature, I was wondering if the information regarding what went wrong would be useful.
Things I have found:
Per the screenshot, and after investigating the media, the SSL files are not present.
The setup may also not have like its IP changing, as it was auto assigned an ip via DHCP, and then the restore would have changed its ip to a static address.
Are you trying to restore a backup made in an earlier different version? Elsewhere in these forums there are reports of problems restoring a backup made on 2024.12 into a system running 2025.01…
DarkPatch
(Dark Patch)
January 6, 2025, 12:50am
3
I upgraded the old instance to 2025.1 prior to making the export.
DarkPatch
(Dark Patch)
January 7, 2025, 12:22am
4
I ended up building the VM again, running through the same process.
This time, prior to coming online I made sure that the IP of the new machine matched the ip of the machine it was replacing. I then set it up as a new instance, installed the Let’s Encrypt SSL package. I’m not sure that I’m actually using it, but it was part of the steps that I was using before.
In the Let’s encrypt, I went to edit yaml and pasted in the yaml from the old machine.
I then installed the FTP addon, and uploaded my SSL files, renaming the files created by the Let’s Encrypt add-on.
Finally I downloaded the /config/homeassistant.yaml and added the lines:
http:
ssl_certificate: /ssl/domain.cert.pem
ssl_key: /ssl/private.key.pem
After that, I went to backup and uploaded my previous backup, and selected to restore from it.
At first it seemed like it was doing the same thing, but as I had FTP enabled, I was able to collect the configuration from before and after the restore and confirm the files configuration files from backup matched.
I ended up rebooting the machine from the console. Upon reboot, I was able to login to it with the correct url and most of the resources were working. ]
I hadn’t yet moved my zWave stick from the old instance, so I manually moved that, and assigned it to the HaOS VM and then did a reboot of the whole ProxMox server and was able to communicate with my zWave devices.
=========================================
A few things I found out:
Even if Home Assistant was off, if I opened my browser to the URL, it would open and show the Loading Data / Retry Now. Based of this, I suspect that I was hitting a locally cached copy instead of the actual server, so I cleared the data for those urls.
I think that even though HomeAssistant was configured for the new IP, my VM was not giving it the ip I requested, so when I tried to access it, I was getting the cached version from above.
I wasn’t able to find the SSL files on the first attempt and there were multiple errors referencing it, hence the steps I took to manually put the files where they were expected.
DarkPatch
(Dark Patch)
January 23, 2025, 7:37am
5
Looks like the fix for this was released in 2025.3
home-assistant:dev
← home-assistant:include_ssl_folder_in_backups
opened 01:09PM - 20 Jan 25 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
Always include SSL folder in backups which include home assistant settings
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request:
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [ ] The code change is tested and works locally.
- [ ] Local tests pass. **Your PR cannot be merged unless tests pass**
- [ ] There is no commented out code in this PR.
- [ ] I have followed the [development checklist][dev-checklist]
- [ ] I have followed the [perfect PR recommendations][perfect-pr]
- [ ] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr
opened 09:13AM - 16 Jan 25 UTC
closed 03:26PM - 20 Jan 25 UTC
bug
core-issue
### Describe the issue you are experiencing
I installed a fresh copy of HAOS, a… nd then restored the backup of my self-installed system. The restore never completed, appearing to hang forever, and the logs revealed that the SSL certificate and private key files couldn't be found so the http service couldn't start. The user is left with a nonfunctional system and no obvious way to proceed as there's now no http service.
Manually editing the config file and taking out the SSL directives allowed the system to start properly.
I'm not sure if it affects things but the cert and key on the source system were in a nonstandard place.
The backup was made on 2025.1.2, and restored on 2025.1.2.
In my view the process should either
- include the cert and key in the backup, and restore it somewhere appropriate, modifying the config file;
- test for presence of the cert and key, and refuse to run if they're not present; or
- remove the SSL config, warning the user, thus at least letting the restore complete cleanly.
### What operating system image do you use?
generic-x86-64 (Generic UEFI capable x86-64 systems)
### What version of Home Assistant Operating System is installed?
2025.1.2
### Did the problem occur after upgrading the Operating System?
No
### Hardware details
TrueNAS SCALE VM using the qcow2 image converted to raw and written to a virtual disk.
### Steps to reproduce the issue
1. Make a backup of a running system using SSL (possibly where key and cert are in nonstandard places)
2. Install the VM image of HAOS and start it
3. Restore the backup on the new HAOS system
4. The restore process hangs forever
### Anything in the Supervisor logs that might be useful for us?
```txt
nothing relevant
```
### Anything in the Host logs that might be useful for us?
```txt
2025-01-15 13:49:01.497 ERROR (MainThread) [homeassistant.config] Invalid config for 'http' at configuration.yaml, line 13: not a file for dictionary value 'http->ssl_certificate', got '/etc/ssl/[domain redacted]/fullchain.pem', please check the docs at https://www.home-assistant.io/integrations/http
Invalid config for 'http' at configuration.yaml, line 14: not a file for dictionary value 'http->ssl_key', got '/etc/ssl/[domain redacted]/privkey.pem', please check the docs at https://www.home-assistant.io/integrations/http
2025-01-15 13:49:01.497 ERROR (MainThread) [homeassistant.setup] Setup failed for 'http': Invalid config.
2025-01-15 13:49:01.498 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'auth'. Setup failed for dependencies: ['http']
2025-01-15 13:49:01.498 ERROR (MainThread) [homeassistant.setup] Setup failed for 'auth': Could not setup dependencies: http
2025-01-15 13:49:01.498 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'config'. Setup failed for dependencies: ['http']
2025-01-15 13:49:01.498 ERROR (MainThread) [homeassistant.setup] Setup failed for 'config': Could not setup dependencies: http
2025-01-15 13:49:01.498 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'diagnostics'. Setup failed for dependencies: ['http']
2025-01-15 13:49:01.498 ERROR (MainThread) [homeassistant.setup] Setup failed for 'diagnostics': Could not setup dependencies: http
2025-01-15 13:49:01.498 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'file_upload'. Setup failed for dependencies: ['http']
2025-01-15 13:49:01.498 ERROR (MainThread) [homeassistant.setup] Setup failed for 'file_upload': Could not setup dependencies: http
2025-01-15 13:49:01.498 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'image_upload'. Setup failed for dependencies: ['http']
2025-01-15 13:49:01.498 ERROR (MainThread) [homeassistant.setup] Setup failed for 'image_upload': Could not setup dependencies: http
2025-01-15 13:49:01.498 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'repairs'. Setup failed for dependencies: ['http']
2025-01-15 13:49:01.499 ERROR (MainThread) [homeassistant.setup] Setup failed for 'repairs': Could not setup dependencies: http
2025-01-15 13:49:01.499 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'websocket_api'. Setup failed for dependencies: ['http']
2025-01-15 13:49:01.499 ERROR (MainThread) [homeassistant.setup] Setup failed for 'websocket_api': Could not setup dependencies: http
2025-01-15 13:49:01.499 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'api'. Setup failed for dependencies: ['http']
2025-01-15 13:49:01.499 ERROR (MainThread) [homeassistant.setup] Setup failed for 'api': Could not setup dependencies: http
...etc...
```
### System information
This is the new system's config once I'd fixed the problem by editing the config file.
## System Information
version | core-2025.1.2
-- | --
installation_type | Home Assistant OS
dev | false
hassio | true
docker | true
user | root
virtualenv | false
python_version | 3.13.1
os_name | Linux
os_version | 6.6.66-haos
arch | x86_64
timezone | Europe/London
config_dir | /config
<details><summary>Home Assistant Community Store</summary>
GitHub API | ok
-- | --
GitHub Content | ok
GitHub Web | ok
HACS Data | ok
GitHub API Calls Remaining | 5000
Installed Version | 2.0.3
Stage | running
Available Repositories | 1500
Downloaded Repositories | 2
</details>
<details><summary>Home Assistant Cloud</summary>
logged_in | false
-- | --
can_reach_cert_server | ok
can_reach_cloud_auth | ok
can_reach_cloud | ok
</details>
<details><summary>Home Assistant Supervisor</summary>
host_os | Home Assistant OS 14.1
-- | --
update_channel | stable
supervisor_version | supervisor-2024.12.3
agent_version | 1.6.0
docker_version | 27.2.0
disk_total | 31.8 GB
disk_used | 6.5 GB
healthy | true
supported | true
host_connectivity | true
supervisor_connectivity | true
ntp_synchronized | true
virtualization | kvm
board | ova
supervisor_api | ok
version_api | ok
installed_addons | Whisper (2.4.0), Piper (1.5.2)
</details>
<details><summary>Dashboards</summary>
dashboards | 4
-- | --
resources | 0
views | 2
mode | storage
</details>
<details><summary>Recorder</summary>
oldest_recorder_run | 29 December 2024 at 15:03
-- | --
current_recorder_run | 15 January 2025 at 14:28
estimated_db_size | 150.22 MiB
database_engine | sqlite
database_version | 3.47.1
</details>
### Additional information
_No response_