metbril / home-assistant-config

🏠 My Home Assistant configuration
MIT License
25 stars 2 forks source link

Automated full backup #24

Closed metbril closed 4 years ago

metbril commented 4 years ago

Create a full snapshot, offload it to another computer and delete old snapshots to prevent filling up the SD-Card.

Ideally the Dropbox sync would be triggered by a folder watcher in the backup directory.


http://www.thesmarthomehookup.com/automated-hass-io-backups-recovering-from-disaster/ https://github.com/sabeechen/hassio-google-drive-backup https://github.com/overkill32/hassio-remote-backup

metbril commented 4 years ago

Full Backup:

automation:
  - alias: Weekly Full Backup, Friday 03:00
    initial_state: 'on'
    trigger:
      platform: time
      at: '03:00:00'
    condition:
    - condition: time
      weekday:
        - fri
    action:
    - service: hassio.snapshot_full
      data_template:
      name: Automatic Full Backup {{ now().strftime('%Y-%m-%d') }}

Partial Backup

automation:
  - alias: Weekly Partial Backup, Friday 03:00
    initial_state: 'on'
    trigger:
      platform: time
      at: '03:00:00'
    condition:
    - condition: time
      weekday:
        - fri
    action:
    - service: hassio.snapshot_partial
      data_template:
        name: Automatic Partial Backup {{ now().strftime('%Y-%m-%d') }}
        addons:
          - a0d7b954_jupyterlablite
          - a0d7b954_motioneye
          - a0d7b954_nodered
          - 3833edd4_googlebackup
          - core_check_config
          - core_configurator
          - core_samba
          - core_ssh
        folders:
          - homeassistant
          - share
          - ssl
          - addons_local.tar

https://github.com/home-assistant/home-assistant.io/issues/7968#issuecomment-462069183