šŸ’¾ Create Automated Backups Every Day

Wondering if it could be possible to also delete previous snapshots if all went well.

I use this GitHub - tmonck/clean_up_snapshots: Service to clean up your home assistant snapshots, so you don't manually have to.

1 Like

Hi, i get an often the following Error. What could it be?

Logger: homeassistant.components.automation
Source: components/automation/init.py:646
Integration: Automatisierung (documentation, issues)
First occurred: 08:08:19 (1 occurrences)
Last logged: 08:08:19

Blueprint Automated Daily Snapshot generated invalid automation with inputs OrderedDict([(ā€˜trigger_timeā€™, ā€˜24:00:00ā€™), (ā€˜send_notificationā€™, True), (ā€˜notify_deviceā€™, ā€˜61840df3aa94bac80a6241014f744687ā€™)]): Expected HH:MM, HH:MM:SS or Entity ID with domain ā€˜input_datetimeā€™ or ā€˜sensorā€™ @ data[ā€˜atā€™][0]. Got None

Nearly 2 months after the change from ā€œhassio.snapshot_fullā€ to ā€œhassio.backup_fullā€ and this is still not fixed? What gives? I did it in config myself but itā€™s a 5 second fix.

2 Likes

I updated line 39 and now Iā€™m getting ā€œError while executing automation automation.automated_daily_snapshot: Unable to find service hassio.backup_fullā€ I thought that was suppose to fix this. Any thoughts?

posted a fixed version of this here: Updated Automated Backups

@rcursaru Thank you!

Is it possible to move the backup automatically to another location?
Iā€™m running HA OS on a raspberry and want the backup be moved to my NAS

I use samba backup as the second post of this thread and it works perfectly

hassio.snapshot_full in the original blueprint is no longer available and probably has to be hassio.backup_full.

I am also using samba backup though, offloading the backup to a NAS.

Interesting topic. Is there also a way to automatically restore a back-up? My plan is to create a second home assistant instance as a back-up. I currently run my primary home assistant on a VM on the Synology. Iā€™ve faced some storage pool issues in the past which led to downtime of HA.

I have a second instance of home assistant on a Pi in the same network. Restoring a back-up from the primary instance to the Pi worked like a charm. But now I would like to automate it that during the night the secondary HA is automatically restored with the back-up from the primary.

Any thoughts?

Yes i have this error

I just saw this as well I just select submit and it said it fixed the workflow. Just scheduled it to run in 10 mns so Iā€™ll confirm that it works in a bit.

Did it work?

Nope Iā€™m still getting the error and the automaton does not work with
2022.9.1

Did you get to the bottom of this? Iā€™m hesitant to update HA. I do notice, though, that the screenshot above mentions hassio.snapshot_full, which has been renamed to hassio.backup_full. Could it be that you are running an old version of the Blueprint?

I disabled the automation and was going to check back this week. Was hoping for some activity on here.

Can you check your blueprint code for the above?

Hello,
i have also problems with Backup. The Service backup.create cant be found.

I use the default Blueprint:

blueprint:
  name: Automated Daily Snapshot for Container/Core
  description: Create a snapshot backup at a given time every day.
  domain: automation
  input:
    trigger_time:
      name: Snapshot creation time
      description: The snapshot will be created at this time, every day
      selector:
        time:
    send_notification:
      name: Send notification
      description: Sends a notification to a device if enabled
      selector:
        boolean:
      default: false
    notify_device:
      name: Device to notify
      description: Device needs to run the official Home Assistant app to receive notifications
      selector:
        device:
          integration: mobile_app
      default: ""
  homeassistant:
    min_version: "2022.5.0"

mode: single
max_exceeded: silent

variables:
  send_notification: !input send_notification
  notify_device: !input notify_device
  notification_title: Automated Daily Backup
  notification_message: "Home Assistant full backup created. {{ now().strftime('%F') }}"

trigger:
  - platform: time
    at: !input trigger_time

action:
  - service: backup.create
  - if: "{{ send_notification }}"
    then:
      - device_id: !input notify_device 
        domain: mobile_app
        type: notify
        title: "{{ notification_title }}"
        message: "{{ notification_message }}"

I get the error Message in home-assistant.log

ERROR (MainThread) [homeassistant.components.automation.automated_daily_snapshot_for_container_core] Automated Daily Snapshot for Container/Core: Error executing script. Service not found for call_service at pos 1: Unable to find service backup.create

Available Backup services are hassio.backup_partial and hassio.backup_full.
But the service should be available Backup - Home Assistant

My System is
Home Assistant 2022.9.6 Supervisor 2022.09.1 Operating System 9.0 Frontend 20220907.2 - latest x64

Unfortunately, the docs often arenā€™t up to date. Available services can be checked in Developer Tools ā€”> Services. You have to edit your automation action by replacing the outdated service with service: hassio.backup_full

1 Like