Use 192.16X.XXX.XXX:[port]/gb or hassio.local:[port]/gb from your web browser to access the UI for setting up authorization with Google Drive.
Use 192.16X.XXX.XXX:[port]/gb/doBackup to perform a backup manually from your web browser.
Use localhost:[port]/gb/doBackup in your rest_command setup to facilitate backup automations.
The web UI will not be accessible from outside your network unless you’ve configured port forwarding for that specific port on your router.
Double check your IP address by trying this from a command line:
ping 192.16X.XXX.XXX
Try stopping and restarting the add-on.
Below is my configuration for the rest_command and automation. Notice the timeout value of ‘300’ given as a string in single quotes, not as an integer without any quotes.
I have my automation setup like this:
- id: '1541263656718'
alias: Run Google Backup
trigger:
- at: 02:00:00
platform: time
condition:
- condition: time
weekday:
- mon
- wed
- fri
action:
- service: rest_command.google_backup
The automation uses a REST command that I setup like this:
Oh! I just saw the segmentation fault. Sorry, I missed that earlier. You’re probably running 64 bit version of hassos. There seems to be an issue with the Python 3 and Alpine 3.9 on 64 bit architectures. The issue doesn’t present on 32 bit systems. I’ll have to create an alternative build for people running on 64 bit. I’m not sure how soon I’ll be able to do that, but I hope to do it soon.
Check the folder ID you gave the add-on during setup. It can only upload to that folder.
As for the name, I thought about looking into this but given that I back up once per day its easy to figure out which backup aligns with which day by looking at the timestamp.
If you look in your /backup folder of your hassio install you will see the file names of the snapshots in that folder are exactly the same as your google drive.
Great idea! So far I’ve been using the folder watcher component to tell when the config was updated, and trigger a backup, then SyncToy (on Windows) to sync it to Drive using an eventwatcher command to launch the sync.