Add-on: Home Assistant Google Drive Backup

Please report this to the maintainer of UniFi Controller

Unrelated to this addon

Thanks, but can you be more specific? Who is the maintainer?

As the Unifi controller is a community add-on, that would be frenck ( Franck Nijhof )

1 Like

The info (including links) is in the add-on:

It seems i cannot install this add-on on my environment, but i already sent a DM to Franck Nijhof, hoping in an answer from him…

You most likely won’t get an answer… :wink:

Just for future reference:
This is a big project, with a lot of people involved in development and issue handling. To handle all this, it is necessary to have some kind of work flow implemented. In this case this means, the handling of issues is done via Github, and only there.

So the normal way for you to investigate an issue you’re having is as follows:

  • Search in the forum (here), if someone already has this issue and made a post about it. In cases like this, where changes were introduced by an actual update, the comments under the blog post are the best starting point.
  • Nothing found in the forum? Move over to Github and check for an issue about your problem. The more people that use the addOn where the issue is coming from, the higher the chance that somebody already made an issue. If so, step in and try to help solving the issue by reporting your errors and faults, what you have done and so on. If somebody had already the same sympthoms, don’t put a post “I have that, too” under it, that’s not necessary and in the end only slows down the solution process.
  • Nothing found? Open a thread here in the forum with your problem, someone from the supporting people will likely step in. This helps to keep the issues in Github a little sorted, maybe it’s not an issue at all and someone alredy has a solution.
  • Still nothing? Then open an issue yourself. :slight_smile:

I know, this is kind of a strict way to handle this, but as a developer you need to set some boundaries.

And last but not least, please use the correct thread to ask in, in your case this would be this thread:

Thanks! :slight_smile:

1 Like

I have just realised that this has stopped working sometime in the past week or so. When I try to load the add-on, I see the following in the log:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 804, in get
    return self._context[key]
KeyError: <class 'backup.util.data_cache.DataCache'>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/aiorun.py", line 231, in new_coro
    await coro
  File "/app/backup/__main__.py", line 11, in main
    await Injector([BaseModule(), MainModule()]).get(Starter).start()
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 963, in get
    result = scope_instance.get(interface, binding.provider).get(self)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 111, in wrapper
    return function(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 806, in get
    provider = InstanceProvider(provider.get(self.injector))
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 291, in get
    return injector.create_object(self._cls)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 990, in create_object
    self.call_with_injection(cls.__init__, self_=instance, kwargs=additional_kwargs)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 1021, in call_with_injection
    dependencies = self.args_to_inject(
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 111, in wrapper
    return function(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 1069, in args_to_inject
    instance = self.get(interface)  # type: Any
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 963, in get
    result = scope_instance.get(interface, binding.provider).get(self)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 111, in wrapper
    return function(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 806, in get
    provider = InstanceProvider(provider.get(self.injector))
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 383, in get
    return [i for provider in self._providers for i in provider.get(injector)]
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 383, in <listcomp>
    return [i for provider in self._providers for i in provider.get(injector)]
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 329, in get
    return injector.call_with_injection(self._callable)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 1021, in call_with_injection
    dependencies = self.args_to_inject(
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 111, in wrapper
    return function(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 1069, in args_to_inject
    instance = self.get(interface)  # type: Any
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 963, in get
    result = scope_instance.get(interface, binding.provider).get(self)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 111, in wrapper
    return function(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 806, in get
    provider = InstanceProvider(provider.get(self.injector))
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 291, in get
    return injector.create_object(self._cls)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 990, in create_object
    self.call_with_injection(cls.__init__, self_=instance, kwargs=additional_kwargs)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 1021, in call_with_injection
    dependencies = self.args_to_inject(
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 111, in wrapper
    return function(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 1069, in args_to_inject
    instance = self.get(interface)  # type: Any
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 963, in get
    result = scope_instance.get(interface, binding.provider).get(self)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 291, in get
    return injector.create_object(self._cls)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 990, in create_object
    self.call_with_injection(cls.__init__, self_=instance, kwargs=additional_kwargs)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 1021, in call_with_injection
    dependencies = self.args_to_inject(
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 111, in wrapper
    return function(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 1069, in args_to_inject
    instance = self.get(interface)  # type: Any
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 963, in get
    result = scope_instance.get(interface, binding.provider).get(self)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 111, in wrapper
    return function(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 806, in get
    provider = InstanceProvider(provider.get(self.injector))
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 291, in get
    return injector.create_object(self._cls)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 990, in create_object
    self.call_with_injection(cls.__init__, self_=instance, kwargs=additional_kwargs)
  File "/usr/lib/python3.9/site-packages/injector/__init__.py", line 1030, in call_with_injection
    return callable(*full_args, **dependencies)
  File "/app/backup/util/data_cache.py", line 40, in __init__
    self._load()
  File "/app/backup/util/data_cache.py", line 47, in _load
    self._data = json.load(f)
  File "/usr/lib/python3.9/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 208 column 13 (char 8180)

Add-on doesn’t load. Am I missing something?

This indicates that one of the files the addon writes its configuration to has become corrupt. This is most likely because of one of two reasons:

  1. The machine was powered off while writing the file and became corrupt.
  2. Some parts of the hard disk have become corrupt.

(1) is unlikely because the file is small, written infrequently, and most modern file systems do a lot to prevent corruption. (2) is especially likely if you’re using HA on a raspberry pi with an SD Card.

You will need to uninstall + reinstall the addon. If you suspect your hard drive might have corruption, I’d recommend replacing it soon.

I should also implement some redundant storage for such configuration in the future to prevent it from stopping the addon if a file like this gets corrupted.

Thanks - spot on. We had a power blip about a week ago that broke a few things. Reinstalled and working now.

Server is now on a UPS. Thanks!

were you able to fix this?

I’m not 100% certain, but I think in his particular case it was a bad password: Github Issue

Gotta say, this add-on is amazingly good. Had been using another one until it was deprecated. This package is so polished and so well documented that it is a joy to use!

One question… with the ability to just upload on backup creation, is the best way to get an update pushed out to just create a snapshot and let the add-on do it’s thing or is there a service call that will create the backup and then upload it from a switch?

That’s at least what I do with it. One time configured, and now and then checking if all is working well. I configured it to make an update in the early morning hours and upload it automatically. Once or twice a week I’ll look into the AddOn and see if everything went well (it always went well, because otherwise I’d get a notification). That’s it!

Just one other thing, from time to time I’m asking myself if it wouldn’t be a good idea to support the development and move over to PayPal or Patreon. But that’s really it! :slight_smile: :smiley:

This really is a hassle free AddOn, that does its work. Period. :rofl:

I installed the add-on this morning and threw some change his way this afternoon. If all add-ons were this user friendly, the HA platform would have more ardent supporters.

Working fine until I have set NGINX SSL addons to reach HASSIO with HTTP on local network and HTTPS outside of my network. Now I have 401 Not Authorized from internal network and running fine from internet.
Any help ?

Its likely you’re seeing this browser issue. If not, check your supervisor logs after getting the 401 and file an issue on Github.

It working now after a server reboot.
Thank you for your fast response.

I found out tonight that I’ve cut and pasted to start every entry in the config.yaml. I need to exclude the media folder as I’m running an NVR but really don’t know how to start an entry for HAGDB. Could someone provide an example or better yet - A link where I can read about what the section name is referenced to? Thanks

Is there a option to exclude folders inside the /share/ folder?
I have Nextcloud Add-on and the data is stored in /share/nextcloud/

I want exclude this folder in the backup…

@MickPB and @poudenes
You can exclude folders in the “Partial Backups” section of settings of the addon’s web-ui. You can exclude whole folders that Home Assistant uses (/share, /ssl, /share, /etc) but you can’t exclude specific subfolders or files within them. This is a supervisor limitation.

1 Like