Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BackupManager object has no attribute 'remove_backup' or 'generate_backup' after updating Home Assistant to 2024.11.0 #162

Closed
h3x89 opened this issue Nov 8, 2024 · 2 comments · Fixed by #161

Comments

@h3x89
Copy link

h3x89 commented Nov 8, 2024

The problem

After updating Home Assistant in Docker to version 2024.11.0, the Auto Backup integration is failing during automatic backups. Previously, the integration worked without issues for a long time. The error logs indicate that the BackupManager object is missing attributes, specifically remove_backup and generate_backup, which are essential for the integration to function correctly.

What version of Auto Backup has the issue?

v.1.5.0

What version of Home Assistant are you running?

Home Assistant 2024.11.0 (Core) Frontend: 20241106.0

What type of installation are you running?

Home Assistant Container

If you're running HA OS/Supervised, what version of the Supervisor are you running?

No response

Example YAML snippet

alias: "[ System AB ] Automatic Backups"
description: ""
use_blueprint:
  path: jcwillox/automatic_backups.yaml
  input:
    enable_hourly: true
    use_action_hourly: false
    backup_action:
      - action: auto_backup.backup
        data:
          name: "{{ name }}"
          password: "{{ password }}"
          keep_days: "{{ keep_days }}"
          include_folders:
            - config
      - metadata: {}
        data:
          message: "Backup created "
        enabled: false
        action: persistent_notification.create
      - data: {}
        enabled: false
        action: auto_backup.purge
    backup_name: |-
      {# {{ backup_type | title }}Backup: {{
        now().strftime(
          "%A, "
          ~ iif(backup_type == "hourly", "%-I:%M %p, ", "")
          ~ "%B %-d, %Y"
        )
      }}
      #}

      {# HourlyBackup: Monday, 3:04 PM, January 2, 2006 #}
      {# DailyBackup: Monday, January 2, 2006 #}

      {#
      Backup: {{
        now().strftime(
          "%A, %-I:%M %p, %Y.%m"
        )
      }}, {{ states('sensor.current_version') 
      }}, {{ backup_type | title }}
      #}

      Backup: {{
        now().strftime("%Y.%m.%d %H:%M")
      }}, {{ states('sensor.current_version') 
      }}, {{ backup_type | title }}

Anything in the logs that might be useful for us?

Logger: homeassistant.components.automation.automatic_backups
Source: components/automation/__init__.py:743
Integration: Automation
Error during backup. 'BackupManager' object has no attribute 'remove_backup'

Additional error stack traces indicating 'BackupManager' object has no attribute 'generate_backup' and deprecation warnings for is_hassio.

Additional information

This issue started after updating Home Assistant to version 2024.11.0. It seems related to missing attributes in the Auto Backup integration’s BackupManager class. This might be a compatibility issue with the new Home Assistant version.

@ccMatrix
Copy link
Contributor

ccMatrix commented Nov 8, 2024

Looks like a duplicate of #160. I have a pull request with a fix you can apply if you want to test it and give feedback on the PR.

@jcwillox jcwillox linked a pull request Nov 9, 2024 that will close this issue
@jcwillox jcwillox closed this as not planned Won't fix, can't repro, duplicate, stale Nov 9, 2024
@jcwillox
Copy link
Owner

jcwillox commented Nov 9, 2024

Yep duplicate of 160, which has been fixed now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants