Backup Component for YAML files to Dropbox

Considering how easily the YAML files can be used to recreate a HA configuration, it would be great to see a component similar to the updater component that could be enabled to backup the known_devices.yaml and configuration.yaml files to a dropbox service…

example yaml entry …

backup:
platform: dropbox
api token: dkjfheubdklnfndsdkfj

something along those lines would be great for the casual users to protect their HA configurations.

There seems to be some prebuilt stuff that should be a pretty good starting point: http://stackoverflow.com/questions/23894221/upload-file-to-my-dropbox-from-python-script

Additional Dropbox Code: https://github.com/andreafabrizi/Dropbox-Uploader

2 Likes

You can install dropbox to Sync and add a cronjob to copy automatic every day/week this files to your Dropbox. Maybe with added timestamp.

I use Dropbox on Linux Ubuntu server on cli.

Yeah, I just like the idea of 1) integrating it with HA to grab those HA specific/important files and 2) seeing entries in the HA logs and potentially building automations with it (notifications for example). This is something more for the casual HA user and not the developer type crowd.

This doesn’t backup to dropbox but a old USB drive would work well. The configuration files are tiny and even a 1GB drive should take a while to fill up.

1 Like

I used Dropbox to backup openhab when I was using that before i found HA.

Openhab has a Dropbox binding that worked well.

Something similar could be done in python/HA

I saw this and thought someone with more phythox/linux skill than me could get it working and provide a cookbook of sorts. Dropbox has a api for python and even provides an example file to show how to backup a folder.

I would be interested in a component to backup a folder to dropbox - could be yaml or images from a camera. Wouldn’t be much work to make a component from this: