Thanks weok! Will be giving this ago when I get home later - looks bloody good. So simple to setup (I kept trying to code it as one block of scripts, but that was just stupid!), seems so obvious reading your code!
Update: All working a treat, just had a chance to add the code, tweaked the timings and updated the notify (bloody handy to know whats happening).
service: notify.ios_my_iphone
Note: For those wanting to use this code, don’t forget to add the rest_command to your config file (as per the github readme)
Wed Dec 05 2018 16:27:06 GMT+0930 (Australian Central Standard Time)
Error executing service <ServiceCall rest_command.google_backup (c:eb253cc9bd2d4bfeaa9486f10c223964)>
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/rest_command.py”, line 103, in async_service_handler
headers=headers
File “/usr/local/lib/python3.6/site-packages/aiohttp/client.py”, line 391, in _request
await resp.start(conn)
File “/usr/local/lib/python3.6/site-packages/aiohttp/client_reqrep.py”, line 757, in start
message, payload = await self._protocol.read()
File “/usr/local/lib/python3.6/site-packages/aiohttp/streams.py”, line 543, in read
await self._waiter
concurrent.futures._base.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/rest_command.py”, line 103, in async_service_handler
headers=headers
File “/usr/local/lib/python3.6/site-packages/async_timeout/init.py”, line 45, in exit
self._do_exit(exc_type)
File “/usr/local/lib/python3.6/site-packages/async_timeout/init.py”, line 92, in _do_exit
raise asyncio.TimeoutError
concurrent.futures._base.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/core.py”, line 1177, in _event_to_service_call
await service_handler.func(service_call)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/rest_command.py”, line 113, in async_service_handler
_LOGGER.warning(“Timeout call %s.”, request.url)
UnboundLocalError: local variable ‘request’ referenced before assignment
you can give the .tar file a password when you create it in the snapshot creation stage (not part of this add-on). This add-on uploads the snapshot, doesn’t create it
Can i get the it to also name the file within google drive the same as within hassio? and also can i add the version number in the name… im using the automation and templates above.
Thanks for sharing your add-on.
I’m wondering Is it possible to have multiple source folder and destination folder with this add-on?
Let’s say I want to backup “/backup/*.tar” and “/config/*.yaml” files, can we do that?
Got everything up and running with authorization but when I call this:
http://<YOUR_HASSIO_HOST>:<HOST_PORT>/gb/doBackup
substituting for my ip address and port. It’s been a blank loading page for 20 minutes now. Is that correct and it just takes a while or am I doing something wrong?