Add-on: Home Assistant Google Drive Backup

IndexError: list index out of range

You’ve run into this bug. I’ll be making a release soon with a fix for it (and others). You can see the bug for details of how to workaround it, you’ll either need to temporarily disable generational snapshots or make sure at least one snapshot exists when you start up the addon.

Could not create snapshot. Creating a snapshot is not possible right now because the system is in startup state

I’ve never seen this error myself, but my best guess is that HA won’t let you make a snapshot because it thinks its still starting up. Either everything is fine and you just need to wait few minutes for things to finish, or something is stuck and you’ll need to check the Home Assistant logs to see if any error message indicate what the problem is.

Thanks!

On 2., after letting HA sit for 24 hours, the issue went away and I was able to manually create a snapshot.

On 1,. the issue went away after manually creating a snapshot. I’ll keep an eye on it to see if subsequent snapshots are created automatically.

Why is such an awesome addon not an official addon? Great work!

2 Likes

Hi ALl,

With latest HA Version: 2021.9.2 I see those errors:
Are they from Google Drive Backup? I use this for my snapshots?

21-09-04 16:11:12 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of Sickchill
21-09-04 16:11:12 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of Nextcloud
21-09-04 16:11:12 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of Headphones
21-09-04 16:11:12 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of emby
21-09-04 16:11:12 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of Jackett
21-09-04 16:11:12 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of Bazarr NAS
21-09-04 16:11:12 WARNING (MainThread) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Emby NAS
21-09-04 16:11:12 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot' is deprecated, 'backup' should be used instead. Please report this to the maintainer of UniFi Controller
21-09-04 16:11:12 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of ESPHome
21-09-04 16:11:12 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of AdGuard Home
21-09-04 16:11:13 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of Sickchill
21-09-04 16:11:13 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of Nextcloud
21-09-04 16:11:13 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of Headphones
21-09-04 16:11:13 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of emby
21-09-04 16:11:13 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of Jackett
21-09-04 16:11:13 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of Bazarr NAS
21-09-04 16:11:13 WARNING (MainThread) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Emby NAS
21-09-04 16:11:13 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot' is deprecated, 'backup' should be used instead. Please report this to the maintainer of UniFi Controller
21-09-04 16:11:13 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of ESPHome
21-09-04 16:11:14 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'snapshot_exclude' is deprecated, 'backup_exclude' should be used instead. Please report this to the maintainer of AdGuard Home

it are just warnings, I’m sure they will be resolved by the time it becomes errors. You can’t expect 3th party add-on authors to react before the HA team announces the changes.

Its not from this addon, its because of the recent change HA made to rename ‘snapshots’ to ‘backups’ moving forward. This applies to all the user facing parts of HA as well as the configuraiton options and API endpoints used internally by addons.

In this case a bunch of the addons you have installed are using an internal configuration option named “snapshot_exclude”, but now it HA wants it to be changed to “backup_exclude”. This isn’t something you can change and the addon maintainers will need to release a new version using the new configuration for the warning to go away.

You’re likely to see a lot of updates for these addons in the next few weeks that address this but it might be a while, they’re giving a lengthy grace period for the transition. I’d only report this to maintainers if you don’t see anything happen for a few weeks.

2 Likes

It took me a while to get through all the changes needed, but I just released v0.105.1. The changelog might not look very long, bit I’ve had to do an obscene amount of testing to make sure all this works right. Some noteable changes for this release:

  • The Home Assistant team recently announced that “snapshots” are to be named “backups” going forward. The addon has been changed for this in the folllowing ways:
    • All reference to snapshots in the web-ui have been updated.
    • All addon configuration that reference “snapshots” have been renamed. Your addon configuration will be updated automatically when the new version starts.
    • The two sensors the addon publish to Home Assistant have also been renamed, since they used “snapshot” in their names and values. Details of that are here. When you upgrade the addon, the Web-UI will ask if you want to use the new names/values just in case you have automations, etc. already using them.
  • Requests to refresh credentials with Google Drive now go to a new domain I’ve set up, https://token1.habackup.io, instead of https://habackup.io. This is done to allow hosting most of the addon’s “cloud” traffic on a much cheaper hosting service. This will significantly extend the project’s financial runway, because https://habackup.io is hosted on Google’s very reliable but also very expen$ive Cloud Run service. The addon will still use https://habackup.io if it detects that https://token1.habackup.io is down, so this gives some extra redundcnacy as well. Doing this is important to support the addon’s recent and expected growth in usage.
  • You can now have the addon delete the most recent backup before creating a new one instead of after. See “Delete oldest backup before creating a new one” in the settings.
  • Added a devcontainer configuration to the project to facilitate easier code contributions.
  • Numerous bug and spelling fixes.

If I’m reading the traffic logs for the addon correctly, it now has over 50K users and is continuing to grow. Yikes, thats a lot of people. Thank you to everyone who has donated to the project. With the recent changes I’ve made to how the website is hosted I’m confident that the current rate of donations will allow the project to be financially self-sustaining for many years without having to do anything more aggressive about asking for support.

If you’d like to join those who keep the lights on, you can donate at any of these places:


7 Likes

Thanks! It’s an awesome addon, development and testing!
Out of curiosity how much does hosting a ~400mb backup which uploads every 2 days or so cost a year? Ballpark…

I’ve been waiting years for someone to ask that question. The recurring out-of-pocket costs for this addon are roughly (all in USD):

  • ~$75/month - Hosting for http://habackup.io on Google Cloud Run, which handles refreshing Drive Credentials. This grows with how many users the addon has, and for example when I first set it up I was charged ~$5/month.
  • $60/year - Renewal fee for the habackup.io domain.
  • $12.50/month - Minimum cost for keeping a “Google Workspace Standard” account that I need to allow me to manually test that shared drive features work with the addon.

Non recurring costs:
I also occasionally have to buy hardware used for testing new releases. For example I have a raspberry pi in every popular flavor, SD cards, etc that I keep around in case I need to debug an issue that affects only that platform. So far I’ve spent about $300 of the addon’s money for this and similar purposes.

So that comes out to about $1100 annually with the current userbase, not including one-off hardware needed for testing. That cost has been the primary reason that I don’t want to grow the addon by, for example, including it in the default community addon repository. If I had twice as many users because of that, the addon would cost me $2000 and the donations would likely no longer cover costs. I’m assuming users who install from there would probably be less generous than the people who find it organically, tragedy of the commons and all that.

With the change in this version (0.105.X) to move most traffic over to cheaper hosting (https://token1.habackup.io), I expect the $75/month hosting cost to drop to something closer to $25/month, which would (optimistically) bring addon’s recurring costs to around $500/year and allow for more growth. That remains to be verified though. I won’t know for sure until most users have upgraded, which from experience I know will take months.

6 Likes

Interesting statistics, it’s kind of a rare insight, most developers make a big secret of their costs. :slight_smile: :+1: I guess, that’s to avoid negative questions like “…and with the rest of the money you go drinking?”.

So in theory every user should pay $0,05 per year, and all costs would be covered (despite the time you put into developing this!!!). :rofl: I know that from own experience, fortunately in my case we’re only talking about 100.-€/year. :slight_smile:

But I have one question, I hope it’s not too sensitive. :wink: What is the average that a user donates to you?

I agree people should be more upfront about it. I’d probably get a lot more donations if I pretended to be just barely scrapping by or ambiguous about the financials, but trust is almost always more economical long term. I can confidently say that right now the project is well funded, and if you don’t have money to spare then you should not give it. I take great pleasure in knowing that donations have never been coerced. The “rest” of the money goes to:

  1. Chipotle Burrito Bowls
  2. Dominos Pizza (thin crust)
  3. 3D printer upgrades

In that order. I keep a nest egg of ~$2000 in the donation account as a financial runway (enough for 2-ish years) and I let myself spend anything over that. Realistically as compensation the amount I spend outside of operating costs is pennies on the hour. I only work on the addon out of love for quality and for the extraordinarily kind things people say about it. Answering questions in this forum and the addon’s issues is also how I “support” the HA community and I use it as a gratitude practice when someone asks a “dumb” (realistically, naive) question to be as helpful as possible. It also helps justify the time I spend on this project to my wife if I can occasionally tell her that I paid for dinner today with “coffees”. Happy wife === stable addon development.

The average donation is about $6.30, almost entirely from Buy Me A Coffee. Occasionally I get something from PayPal directly (maybe ~$20 monthly, but its growing), and recently I’ve had a few supporters on Patreon (~$3/month). Patreon is nice because the money is stable, but I can totally understand why people wouldn’t want to do a recurring thing. Its also worth knowing that Buy Me a Coffee and Patreon both take about a 15% - 30% cut off the top, so I might only get $4 of those $6 dollars. Unfortunate, but this community is in love with Buy Me a Coffee. Direct PayPal goes almost entirely to me, though I’m not yet sure what I need to report to the IRS about that :grimacing:

The mechanics of soliciting donations is also interesting. Most donations come from people clicking the support link in the addon web-ui and guithub, but If I make a particularly kind or thorough post to this thread I can see a measurable increase in donations the following day, especially from people in northern Europe. Presumably thats because it bumps the threads up in the forum rankings and just gets more eyeballs on the donate buttons. I try not to abuse that power, but power always corrupts. Speaking of which:

(I can see how many people click on this)

8 Likes

hi, on my 3 HA instances 2 are updated, and my production system is not alerted for the update and remains on 104.3 … it has been more than a few hours now, so please forgive me asking here. only thing I can think of is that the production is a pi4 in 64 bit, where the other 2 are Pi3 32 bit.

please have a look? thanks!

I updated my Pi4 on HAOS last night. My Pi3b+ is running 64bit Pi OS and the update for that is going through now.

Thanks so much for this add-on. Great documentation and functionality and thanks for sharing the costs. It made me decide to buy you a coffee as I didn´t realize that it had such elevated costs, so glad to have been able to help!

oddly enough it still doesnt show the update. have restarted many times because of another Component so that didnt help either. Maybe because I use OS 6.3?

So am I so it’s not that. Very strange.

I also see different settings on both Pi’s on different browsers. Some show it’s working with all the backups showing and others show this screen -

It doesn’t seem to be browser caching either. Odd.

I’ve had a few bug reports about this, after upgrading the page shows “waiting for backups to load” and shows nothing else. The addon is running fine in the background and this appears to be an issue with Chrome (or other chromium based browsers) caching, but we’re not sure.

I’ve had users report that the following works to remedy it, but not all of them work every time:

  • Waiting a few hours (1 report)
  • Clearing the browser cache completely (2 reports)
  • Uninstalling and reinstalling chrome (3 reports)
  • Using a different browser (8 reports)
  • Uninstalling and reinstalling the addon (2 reports)

If anyone can make heads or tails of what is going on, please chime in. I haven’t had any success reproducing this on any of my machines.

cant believe this to have anything to do with browser cache, (tested it nonetheless and all show the same). Also,the supervisor entities don’t show the update either on this HA instance:

Yeah the cache is just a guess, multiple people have reported that reinstalling the browser or waiting “fixes” it, so thats what I’ve got to go on. I really have no idea yet whats causing it.

The supervisor doesn’t always check for addon updates on a reasonable schedule, the latest version is verifiably released. If you’re having trouble seeing the latest version, go to “Supervisor” > “Add-on store” > “…” > “Reload” to force a check. If it still doesn’t see the latest version, check the supervisor logs to see if it ran into any errors trying to read from GitHub.

no real error on the add-on I guess and this line in green:

21-09-12 12:34:50 INFO (SyncWorker_4) [supervisor.docker.interface] Attaching to sabeechen/hassio-google-drive-backup-aarch64 with version 0.104.3

I suppose I could uninstall and re-install from anew, but would it keep my backups? (copying the current config would be no problem ofc)