Home assistant is very nice system, but every system can crash or disks it resides on can stop spinning eventually, so we need to keep configuration and data safe with some kind of backup, this addon provides exactly that. More about borgbackup could be found at borgbackup website
Few things this addon provides to you are:
- automation of backups
- compression of backups
- deduplication of backups
first part is done by home assistant but last two are benefits that borgbackup provides.
- Add https://github.com/bmanojlovic/home-assistant-addons into supervisor addons-store
- Install Borg-Backup addon
- configure system and addon for backups
there are two ways to configure borg repository path, using borg repository uri, or using "manual" way of setting it up using borg_hostname borg_user and borg_reponame parameters. it could look to something like
borg_hostname: host
borg_user: user
borg_reponame: path/to/repo
or
set borg_repo_url to something like
borg_repo_url: user@host:path/to/repo
Please be aware that you are supposed to use only one way of doing it, as if both are used addon will exit with error.
When first run addon will provide in its logs information of ssh key that you should set on borg backup server. Example key how it should look like is shown bellow.
[00:01:07] INFO: Your ssh key to use for borg backup host
[00:01:07] INFO: ************ SNIP **********************
ssh-rsa AAAAB3N... root@local-borg-backup
[00:01:07] INFO: ************ SNIP **********************
In Automation add something like this in Configuration -> Automations
- click + symbol
- skip Almond if you have it
- add Name
Automatic borg backup
- in trigger section set "trigger type" to
Time
- on line stating "At" set time at which you would like backup to be done
02:02:02
- in actions set
call service
if not already set - for service set
hassio.start_addon
- in "Service data" add above installed addon. Exact name of "
xxxx_borg-backup
" in configuration should be provided to you by system when you open from "supervisor dashboard" and going to addon page (look at URL of borg-backup )
addon: xxxx_borg-backup
- save, sit and relax as it should work now :)
Use issue tracker on github for any issue with this addon.