I’m trying to follow the instructions to create new credentials as I too got the email from Google. It seems the instructions don’t match what I see in the Google console so trying to follow them isn’t going too well for me…
In the menu on the upper left, click Enabled APIs & Services then OAuth Consent Screen.
This just shows me the existing OAuth I have setup for Assistant Relay with no option to create a new one…
You probably have mroe than one “project” in Google cloud, most likely one for the addon and one for the HA Relay. Google only lets you make one consent screen per project (I think…). You can switch projects using the drop down list next to “Google Cloud Platform” at the top of the page.
If you’re using the same Google Cloud project for both, which is also possible, you can click “Edit App” at the top of the Consent screen page to make changes to it. You should just need to make sure you’ve set the options listed in the guide.
Hello,
Awesome utility!
Installed and started to use this add-on 5 days ago. I have configured to generate 1 backup daily at 3 AM. Everything mostly working ok, except that looking into logs I see that sometimes, at expect time of completion there is message “WARNING A backup was already in progress”, and no file is copied to Google Drive. The the add-on retries 3 hours later and finally has been able to correctly complete the process. I have see up to two retries required before successful completion.
My experience so far:
Day 1 - Backup Completed normally
Day 2 - Backup Completed normally
Day 3 - Backup completed 3 hours later then scheduled, one reattempt required.
Day 4 - Backup completed 6 hours later then scheduled, two reattempts required.
The most likely possibility is that Home Assistant (the supervisor specifically) is rejecting the request to create a backup for some reason. This might be because a backup really is already in progress, or because the supervisor is in one of its modes where it doesn’t let backups (or other changes) get made. The addon is unable to tell the difference Home Assistant doesn’t expose that information to it. On the first failure you should be able to find something in the sueprvisor’s logs that give more detail about why it refused to make a backup.
In my case, successful backups take about half hout to generate. On the failed attempts, i see the following sequence
05-29 03:01:34 INFO Requesting a new backup
05-29 03:34:20 WARNING A backup was already in progress
The warning message is reported at the time when backup would be completed, not when starting.
Also I can see from CPU and File system usage stats that the system is “working” in generating the backup, but finally, after half hour, the CPU returns to normal, disk space is freed, and no backup file can be found.
I have checked system logs, and could not find any registries related to this issue.
On successfull backup, the Add on logs are as follows:
5-29 06:01:36 INFO Requesting a new backup
05-29 06:34:21 INFO Backup directory changed
05-29 06:34:24 INFO Syncing Backups
05-29 06:35:37 INFO Backup finished
05-29 06:35:37 INFO Syncing Backups
05-29 06:35:42 INFO Uploading ‘Full Backup 2022-05-29 06:01:34’ to Google Drive
05-29 06:36:36 INFO Deleting ‘Full Backup 2022-05-29 06:01:34’ from Home Assistant
05-29 06:36:37 INFO Syncing Backups
05-29 06:36:42 INFO Backup directory changed
05-29 06:36:42 INFO Syncing Backups
Screenshot of CPU and Disk usage of failed attempt and then successful attempt three hours later:
I have been able to finally find out the reason for failed backups. When it fails, following error is registered in supervisor log:
22-06-05 09:34:03 ERROR (MainThread) [supervisor.homeassistant.module] Can’t backup Home Assistant Core config folder: [Errno 2] No such file or directory: ‘/data/homeassistant/zigbee.db-journal’
This error causes Home Assistant Backup to be interrupted and no backup file is generated.
You might be able to work around this by instructing instructing this add-on to stop the offending add-on while its taking a backup (Settings > Stop Addons).
I added that to this add-on before Home Assistant allowed add-ons to have special behavior during backups and it still works today.
Alternatively you could exclude that addon from backups (eg use a partial backup) until its fixed.
This addon is in a difficult situation when an backups fails, because Home Assistant doesn’t expose a way to determine if a backup failed and the only way to see if a back up is in progress is to ask for a new backup and get an error reponse back. When a backup fails, the addon waits for it to time out (6 hours iirc) before it will try again.
Thanks for response. The failure is related to the zigbee service, which is provided via ZHA integration, and not an add-on, thus I do not think it can be stopped or excluded.
I can see following the Github ticket I opened that a team has started to discuss possibilities to address the issue.
BTW, you mention a timeout of 6 hours for automatic retry of backup after a failure. In my case I am observing 3 hours. Can this be configured somewhere?
i don’t know if you made something about permanent retention so,
i made a rest command in order to call it as a service but i cant retrive the last backup’s slug number in the payload section… it can be retrived from sensor.backup_state attribute maybe.
can anyone help me??
- platform: template
sensors:
gdrive_last_bkup_slug:
friendly_name: Gdrive last backup slug
value_template: |-
{%- for s in state_attr('sensor.backup_state', 'backups')
if (state_attr('sensor.backup_state', 'last_backup') in s.date) %}
{{s.slug}}{% if not loop.last %}
{% endif %}
{%- endfor %}
is there a list of recommended or required add-ons to stop at backup? its not enabled by default so im guessing its uncommon but wanted to check. most of my add-ons are replaceable, but mosquito broker, ring-mqtt, and z-wave js to mqtt are all pretty critical and things i would Not want to set up from scratch again. Are any of those recommended to stop? any other common add-ons that are problematic for backups?
I use all those addons and have never needed to stop any of them before making a backup.
A while ago it was recommended to stop the MariaDB addon before creating a backup, but I believe that issue has since been resolved. However, I still have it set to stop before a backup since I never got around to changing the settings since it’s been working as is.
Hello, I have been using this add-on for over a year on my current setup and I am trying to change the Google drive account where my backups are saved but Google seems to be blocking something.
The currently configured account appears to still be working fine, the last backup was uploaded this morning at 3AM but when I try to change the account using both methods, I am receiving the same Google message when I get redirected to google to authenticate; (using the “authenticate with Google Drive” simple option) or authorize using client ID and secret (using the external domain method, fully configured on the new google account according to the instructions (https://github.com/sabeechen/hassio-google-drive-backup/blob/464a9e9c1bb362e247cb1411e8cab37183b09bed/LOCAL_AUTH.md)); I am always getting an Authorization Error from Google:
Authorization Error
Error 400: invalid_request
You can’t sign in to this app because it doesn’t comply with Google’s OAuth 2.0 policy for keeping apps secure.
You can let the app developer know that this app doesn’t comply with one or more Google validation rules.
Request Details
The content in this section has been provided by the app developer. This content has not been reviewed or verified by Google.
If you’re the app developer, make sure that these request details comply with Google policies.
redirect_uri: urn:ietf:wg:oauth:2.0:oob
@RickyFish Usually an when an addon doesn’t back-up correctly the addon developer fixes the issue, so there isn’t any one in particular I know of that still needs to be stopped. The feature was added to stop addons during backup before addons had the ability themselves to do something special during backup. I haven’t removed it because it still comes in handy every once in a while (ie new bugs) and some users just seem to like always using it anyway.
I only recently discovered this add-on but I’m struggling to get the add-on to start (with latest version of HA installed).
It successfully installs and when I click start, it fails to start. I’ve tried restarting HA but the problem persists.
I’ve also tried uninstalling and re-installing the add-on - the problem still persists.
I have noticed that there is a red dot in the top right corner - as per pic below.
If I select all the options (start on boot, watchdog etc), click on start, they all go back to the off position.
The log can also be found below.
Hoping you can assist
Hi @sabeechen
So after some digging, I discovered that Firefox was blocking the plugin from starting - I suspect it’s one of my Firefox add-ons.
I’ve set everything up with Chrome so all is great!
Thanks so much
@sabeechen - Stephen the other thread (from May 2019) has become too long so thought will start a new one.
I recently updated to version 0.108.2 and seems that the add-on keeps failing due to “Google Drive is full” but at the same time shows correctly the free space on Google drive. See screenshot below & attached logs if it helps.