Skip to content

Backup to Cloud Fails to Home Assistant Cloud #142178

Open
home-assistant/supervisor
#5871
@stu1811

Description

@stu1811

The problem

I have my system setup to backup to the HA Cloud and a local CIFS share. The CIFS share is unencrypted and seems to work fine. I get an error when backing up the cloud. The logs indicate a problem encrypting the data before uploading to the cloud.

What version of Home Assistant Core has the issue?

core-2025.3.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Backup

Link to integration documentation on our website

No response

Diagnostics information

Every night my automated backup fails. Snippets below are from the core logs.

Image

Logger: homeassistant.components.backup
Source: components/backup/manager.py:579
integration: Backup (documentation, issues)
First occurred: April 1, 2025 at 8:16:42 AM (4 occurrences)
Last logged: 5:23:52 AM

Upload failed for cloud.cloud: Indicated size 1489090560 does not match actual size 1488437760
Upload failed for cloud.cloud: Indicated size 1407354880 does not match actual size 1406713344
Upload failed for cloud.cloud: Indicated size 1427425280 does not match actual size 1426779136
Upload failed for cloud.cloud: Indicated size 1422008320 does not match actual size 1421358592
Logger: root
Source: components/backup/util.py:441
First occurred: April 1, 2025 at 8:16:42 AM (4 occurrences)
Last logged: 5:23:52 AM

Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/threading.py", line 1041, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/usr/local/lib/python3.13/threading.py", line 992, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/backup/util.py", line 393, in encrypt_backup
    _encrypt_backup(input_tar, output_tar, password, nonces)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/backup/util.py", line 441, in _encrypt_backup
    nonce=nonces[inner_tar_idx],
          ~~~~~~^^^^^^^^^^^^^^^
IndexError: list index out of range

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions