This Hass.io add-on provides a simple way to upload your snapshots to Dropbox.
Add this repository URL in Hass.io:
https://github.com/d0ugal/hassio-dropbox-upload
You will need to create a Dropbox app
- Choose
Dropbox API
- Either type of Dropbox app should work (Full or App directory)
- Give it a unique name, this can be anything
- Set the following scopes in the Permission tab (you need to do it before generating the token).
- Click
Generate
under "Generated access token" and copy the token.
Options | Default | Description |
---|---|---|
access_token | Dropbox API Access Token. Required. | |
dropbox_dir | "/snapshots" | The directory name in dropbox to upload snapshots. Must start with a forward slash. |
keep | 10 | The number of snapshots to keep. Once the limit is reached, older snapshots will be removed from Hass.io and Dropbox. |
mins_between_backups | 60 | How often, in minutes, should the addon check for new backups. |
filename | snapshot_slug | What filename strategy should be used in Dropbox? Can be either "snapshot_name" or "snapshot_slug". |
debug | false | A flag to enable/disable verbose logging. If you are having issues, change this to True and include the output in bug reports. |
{
"access_token": "<YOUR_ACCESS_TOKEN>",
"dropbox_dir": "/snapshots",
"keep": 10,
"mins_between_backups": 60,
"filename": "snapshot_name",
"debug": false
}
Here is the automation I use to create a snapshot and upload it to Dropbox.
- alias: Backup Nightly
trigger:
platform: time
at: '02:00:00'
action:
- service: hassio.snapshot_full
data_template:
name: Automated Backup {{ now().strftime('%Y-%m-%d') }}
password: !secret snapshot_password
This project is young, and very light. I am interested in adding some features - so long as it remains simple and easy to use. Please let me know of your ideas and feedback!
tox -e docker-build
and tox -e docker-push
are probably the easiest way.
I tried setting up the github actions but failed. This works for now, good luck future person trying to do this :)