It does not run all the time in the background, you start it with an automation which syncs the backup folder (configurable) to your S3 Bucket (configurable of course).
Example of using the Addon with an Automation:
automation:
# create a full backup
- id: backup_create_full_backup
alias: Create a full backup every day at 4am
trigger:
platform: time
at: "04:00:00"
action:
service: hassio.backup_full
data:
# uses the 'now' object of the trigger to create a more user friendly name (e.g.: '202101010400_automated-backup')
name: "{{as_timestamp(trigger.now)|timestamp_custom('%Y%m%d%H%M', true)}}_automated-backup"
# Starts the addon 15 minutes after every hour to make sure it syncs all backups, also manual ones, as soon as possible
- id: backup_upload_to_s3
alias: Upload to S3
trigger:
platform: time_pattern
# Matches every hour at 15 minutes past every hour
minutes: 15
action:
service: hassio.addon_start
data:
addon: XXXXX_amazon-s3-backup
I am using it myself for more than 6 months without problems.
Hi Thomas- thanks for writing this! I’ve been moving more of my backups to S3, so this is perfect to have. I noticed one issue where it appears to loop continuously/keeps running the deletion portion in the background- based on the automation description, I don’t think this is expected behavior?
[13:20:11] INFO: Starting S3 Backup...
[13:20:17] INFO: Will delete all the oldest local backups except the '3' newest ones.
[13:20:18] INFO: Finished S3 Backup.
[13:20:18] INFO: Starting S3 Backup...
[13:20:24] INFO: Will delete all the oldest local backups except the '3' newest ones.
[13:20:25] INFO: Finished S3 Backup.
[13:20:25] INFO: Starting S3 Backup...
[13:20:31] INFO: Will delete all the oldest local backups except the '3' newest ones.
[13:20:32] INFO: Finished S3 Backup.
[13:20:32] INFO: Starting S3 Backup...
[13:20:38] INFO: Will delete all the oldest local backups except the '3' newest ones.
[13:20:39] INFO: Finished S3 Backup.
[13:20:39] INFO: Starting S3 Backup...
[13:20:46] INFO: Will delete all the oldest local backups except the '3' newest ones.
[13:20:47] INFO: Finished S3 Backup.
[13:20:47] INFO: Starting S3 Backup...
[13:20:53] INFO: Will delete all the oldest local backups except the '3' newest ones.
[13:20:54] INFO: Finished S3 Backup.
[13:20:54] INFO: Starting S3 Backup...
[13:21:00] INFO: Will delete all the oldest local backups except the '3' newest ones.
[13:21:01] INFO: Finished S3 Backup.
[13:21:01] INFO: Starting S3 Backup...
[13:21:07] INFO: Will delete all the oldest local backups except the '3' newest ones.
[13:21:07] INFO: Finished S3 Backup.
[13:21:07] INFO: Starting S3 Backup...
[13:21:14] INFO: Will delete all the oldest local backups except the '3' newest ones.
[13:21:15] INFO: Finished S3 Backup.
[13:21:15] INFO: Starting S3 Backup...
[13:21:21] INFO: Will delete all the oldest local backups except the '3' newest ones.
[13:21:21] INFO: Finished S3 Backup.
[13:21:22] INFO: Starting S3 Backup...
Hey, I just released a bugfix release v1.2.2 which fixes the continuous run of the backup addon.
Its not meant to run in the background continuously (as a daemon). Its meant to get started by an automation. You can see an example in the Documentation. So there is no need for enabling Watchdog.
This way it will save your cpu and memory resources during the day and just uses some while syncing your local backups to S3.
There is also a Feature Request to add support for other S3 API compatible providers. I would really appreciate help or even a Pull Request. If you are using any of the S3 compatible providers and can test it that would really help.
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[16:31:56] INFO: Starting Amazon S3 Backup...
[16:32:04] INFO: Will delete local backups except the '7' newest ones.
[16:32:04] INFO: Finished Amazon S3 Backup.
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped