Add-on: Home Assistant Google Drive Backup

So, saw this in the log. What needs to be done?

api_password is going to deprecate. You need to use a bearer token to access /api/states/binary_sensor.snapshots_stale

Thanks for the explanation. If I have time, and change the one or the other of the configuration files, it is great to fall back on an “intact” version in case of errors.

This seems to have broken my Home Assistant. I installed it, went through the motions, everything worked fine and then suddenly HA frontend became inaccessible, can’t SSH in to it - it’s completely dead. Any idea how to rectify?

Ironically, I never back it up so wanted to use this addon to do that.

EDIT: After about 20 minutes of waiting HA has finally started up again but the addon has not started on boot. I think I’ll just leave it and find another way to back up.

The add-on runs in its own little docker container that only starts up after home assistant (like any add-on) so its unlikely to be able to prevent HA from booting, but if I had to guess it could be:

  • Your instance has gone non-responsive while its creating a snapshot. Unlikely but possible, I’ve seen my little rpi get pretty sluggish while it struggles to compress a big sensor database.
  • Creating a snapshot made you run out of space. Home assistant doesn’t really handle an exhausted disk well and to the best of my knowledge Hassio will happily run the system into the ground if it doesn’t have enough space to make a snapshot. I think you should be able to pop the SD card into another computer to verify if this is the case if you’re running this off an rpi.

This looks particularly interesting. Loving the web front end. I wonder though if this could go a step further with both onedrive and dropbox integration :thinking:

2 Likes

Hi,
this looks really good, just one question

whats the difference between this one and this one linked below

Feature request: Ingress :slight_smile:

1 Like

@phairplay Some of the existing backup add-ons are similar (especially that one), but the problem I’ve had with most things in Home Assistant is that its a huge pain to robustly configure. I’m a pretty adept technology enthusiast, and it still takes me hours to adapt every add-on/plugin/feature to work reliably.
Right out of the box when you install this add-on and authenticate it with Google Drive:

  • It starts making snapshots and backing them up.
  • It has default settings that make sense for most people.
  • It notifies you in Home Assistant if it runs into problems (other notifications, like mobile, are easy to configure too, see the FAQ).

I’ve designed the web UI around making very clear what its doing, eg when is the next snapshot, how often they happen, when was the last snapshot, etc. When its doing something with a snapshot (creating one, backing one up, etc) I also try to make that clear. You don’t have to set up any node-red flows, automations, service calls, or lookup esoteric yaml settings to make it work well or understand what its doing in the background.

Errors are presented front-and-center in the UI so you don’t have to parse through logs. I also haven’t seen an add-on that makes recovery simple, eg if you want to restore a snapshot from a fresh install. I’ll be pushing a new release soon (optimistically today) targeted at this. I’m getting pretty close to what I envisioned this being a completed product, but its still a work in progress so some of the differentiating features are yet to come.

2 Likes

@teachingbirds Ingress might be a bit complicated for this add-on to support because of how Google authentication works. The authentication mechanism needs a way to redirect the browser from Google’s auth page to an address that hits the add-ons webserver. Its also nto clear to me if ti can be enabled in a way thats backwards compatible with ingress-unaware versions of Hassio. Ingress is still a pretty new feature (just a few weeks old I think) and the docs on it are a little sparse, so I’ll spend some time seeing if I can make it work.

1 Like

I made a small unannounced release last week, and today I’m releasing a much bigger one. This represents the completion of the feature set I imagined when first creating the add-on, thank you to those of you who have been testing this and filing issues. Refresh the add-on store page to make Hassio see the v0.8 release.

Since the last release announcement I made, the current version includes:

  • Passwords you can configure archives to be saved with a password (details).
  • Partial Snapshots You can exclude specific folders and addons from scheduled snapshots (details).
  • Settings menu. You can change the add-on’s settings from a form within the add-on web UI. This is equivalent to editing the add-on’s settings from the Hassio dashboard (they both save to the same place), but its much less error prone. Especially for configuring partial snapshots.
  • UI tweaks Lots of little tweaks everywhere, and now it renders well on everything down to a phone sized screen.
  • Upload Upload snapshots from Google Drive back to Hassio with one click form the “Actions” menu.
  • Error Reports Optionally, you can enable sending error reports to a database I maintain. By default this is off but it really helps me make things work better if you turn it on (details).
  • Download The UI includes a direct link to downlaod snapshots from the browser (Actions -> Download).
    Resue Existing Snapshot Folders If you install the add-on fresh, it trys to find the last snapshot folder in Drive and reuse it
  • Restore Together, this release makes an easy way to restoring snapshots in the event of total failure (eg the SD card on your raspberry pi kicks the bucket). This make for a very convenient way to restore an old snapshot on a fresh install. For example if your HA instance died you could:
    • Boot up a fresh Hassio, install the add-on and connect it with Drive. Your existing snapshots will show up.
    • Connect the add-on with Google Drive (it will find your old snapshots)
    • Click Actions -> Upload on the snapshot you want to restore. Wait for the upload.
    • Click Actions -> Restore to be taken to the Hassio restore page, where the uploaded snapshot shows up.
  • Logging Shows a link to debug logs in the top right of the web UI and when it gets an unexpected error. Usefull if you need to file a bug with me.
  • Fixes Resolves a few bugs users have noticed, especially one that would cause it to always fail and hog memory large for very snapshots. Special thanks to whoever enabled error reports so I could be made aware of this memory error.
5 Likes

Great work awesome add-on

Thank You

Thanks for the add-on. Installed it, and had it working in 5 min!

Thanks also from myself for this great add-on! Love to see the data is saved as i alreday had one SD card currupted before. Now i’m relaxed for the next one (hopefully never coming).

/ Ralf

I also haven’t seen an add-on that makes recovery simple, eg if you want to restore a snapshot from a fresh install. I’ll be pushing a new release soon (optimistically today) targeted at this.

To confirm: just did exactly this (my SD-card ran out of space). So i just:

  • created a snapshot, which got uploaded automatically
  • created a new Hassio install with etcher
  • waited for it to install, installed this addon
  • authenticated with Google drive, downloaded the latest image and restored

Everything was ready to go imediatly! No need to set up Samba first. So a nice experience!

1 Like

There is text on the web page that states “If desired, you can move the folder to a different area in My Drive”.

If the folder is moved or renamed, is there a configuration setting that needs to be set to identify the new location?

No, it’ll always find the folder regardless of its name or location so long as its still accessible from somewhere in your My Drive. It’ll create a new folder and start uploading there instead if you:

  • Trash the folder
  • Delete the folder
  • Transfer ownership of the folder (including a move into a Team Drive)

OneDrive would be great!

1 Like

I’m probably not going to retrofit this for any other cloud storage providers. Honestly, it s a lot of work to get just one working well. Each one has their own weird little quirks that make integrating difficult despite all fundamentally doing the same thing. I chose Google Drive because they offer copious free storage, I happen to be very familiar with the API’s quirks already, and you probably already have a gmail account lying around somewhere? Thats FOSS for you :stuck_out_tongue:

Once I’ve got ingress working, I’m basically going to be working on this in maintenance-and-bug-fixes-only mode. Maybe new features if the Hassio or Home Assistant people release something cool to integrate with (like ingress).

1 Like

Copious? 15GB is not much and I have 250GB on onedrive going begging. Similar for Dropbox… not much there either. Anyway thanks. Looking at duplicati in docker which will do it but in a weird way…

Thank you!!! This Add-on is outstanding in a number of different ways:

  1. It was simple to install, worked right away and didn’t require a lot of thinking or learning to figure out what it was doing.

  2. The install instructions were the best I’ve seen yet. (And I used the advanced, “Locally Authenticating” option!) They didn’t assume a lot of knowledge, and led the user step-by-step without the cryptic jargon and missing steps found in so many of these instructions. Easy links to everything needed were provided, no searching. Frankly, I think some developers are just lazy, while others actually enjoy the holier-than-thou feeling they get by keeping “mere” newbies guessing.

  3. I don’t know exactly how to describe this, but it’s a real finished product which goes well beyond just solving a coding problem. It actually shows some thought (and respect) for how the end-user is going to use it, day to day. I know that’s partly because it was written for personal use. But it shows a level of experience and skill that stands out. Thank you!

9 Likes