Add-on: Home Assistant Google Drive Backup

you clicked on this?:
image

Yes I clicked that button.

ok so did you rename the snapshot after it was created?

I tried no rename and renaming it. When putting it in backup folder.

if you rename it then it won’t see it.

Are you sure you put it in the correct folder?

Yes its in the right folder. I did not rename until I tried many time. I deleted and recopied back to the backup folder.

@SnowmanUT I’ve created an issue on github for what you’re seeing, link here. I had one other user run into this problem but we were unable to get to the bottom of it, so I’m starting to suspect I have a bug. I’ve made some suggestions in the issue that might help get to the bottom of it if you’re willing to help me. If so, I’d like to move the discussion there.

I have this in supervisor log

19-11-24 11:18:42 ERROR (MainThread) [hassio.api.ingress] Ingress error: Cannot connect to host 0.0.0.0:8099 ssl:None [Connection refused]

And also this

19-11-24 09:58:28 ERROR (MainThread) [hassio.homeassistant] Error on call https://172.30.32.1:8123/api/states/binary_sensor.snapshots_stale: Cannot connect to host 172.30.32.1:8123 ssl:None [Connection refused]
19-11-24 09:58:28 ERROR (MainThread) [hassio.api.proxy] Error on API for request states/binary_sensor.snapshots_stale

Both have been working previously.

That second message indicates that Hassio is unable to communicate with Home Assistant’s internal API. I suspect this and your trouble reaching the addon have the same cause: something is blocking internal connections. Unfortunately there are about a million ways to get Home Assistant/Hassio into a bad state. Maybe you have a new firewall?

No, nothing new. Upgraded hassio, cant say for sure after which relase, .100 maybe, and this started. Havent changed anything else.

Copy settings in addon. Uninstall and install and add settings should work? Old backups would reamin?

Yup that should work, just copy in your old settings after you reinstall and then restart the add-on. You’ll need to connect the addon with Google Drive again after you run it, but that’s just a few clicks. It should find all the snapshots again in home assistant and Google Drive.

This is excellent, I just tried it.
Keep up the good work.
Would be awesome to add other providers like dropbox in the future to provide a well maintained defacto plugin.

still new to your add-on, I wonder if I did something wrong, or if the sensor created doesn’t completely reflect the full set of backups made.

using some markup in Lovelace I see this:
34

which states the obvious: 2 backups in Google 4 in the Hassio instance. Why then does it only show 4 snapshots in the listing…?

this is the Markdown code with the template:

      - type: markdown
        style: |
          ha-card {
          background: 'var(--paper-card-background-color)';
          }
        content: |
          ## <ha-icon icon='mdi:home-assistant'></ha-icon> --> <ha-icon icon='mdi:google-drive'></ha-icon> Home-assistant backed-up
          **Snapshots:**
          {%- for sh in state_attr('sensor.snapshot_backup','snapshots') %}
            - Name: {{sh.name}}
              Date: {{as_timestamp(sh.date)|timestamp_custom('%d %b: %X')}}
              State: {{sh.state}} <br>
          <br/>
          {%- endfor %}
          ___
          **Details:**
            - Last snapshot: {{as_timestamp(state_attr('sensor.snapshot_backup','last_snapshot'))|timestamp_custom('%d %b: %X')}}
            - On Google Drive: {{state_attr('sensor.snapshot_backup','snapshots_in_google_drive')}}
            - In Hassio: {{state_attr('sensor.snapshot_backup','snapshots_in_hassio')}}

thanks for having a look! fine tool for a quiet mind :wink:

Each unique snapshot only shows up once in the list. The “state” indicates if it’s in Hassio, Google Drive, both, uploading, etc. Eg:

  • “Backed Up” - it’s in both drive and Hassio
  • Hass.io Only”
  • “Drive Only”
  • “Pending” - it’s being created in Hassio
  • “Uploading x%” - it’s being uploaded from Hassio to Drive

a I hadn’t noticed that. so the counting adds-ip correctly then, thanks for explaining!

been looking for a nice card background for your component results, with a google drive colored and HA icon. All I can come up with are bad image edits…


you don’t happen to have anything laying around do you?

getting below while authenticating:
any idea?

# Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Apache/2.4.10 (Debian) Server at philosophyofpen.com Port 443

This is just to say thank you @sabeechen! My Hassio crashed and I can’t get Samba to work in the latest version. I kept re-building and then Hassio would crash again. Then I found your Add-On.

So easy! I’ve been re-building my config in steps. After each working step I create another Snapshot. This then magically appears in my Google Drive.

I suspect all my SD Cards are a bit flaky. I have some new ones arriving today. I will just flash a new Hassio instance, install your add-on and restore the latest snapshot.

Thanks again. I have also starred your GitHub. Keep up the good work.

Just to let you know - this worked a treat!

Looks very nice.
Just one question, I have 2 hassio devices, would it be possible to add to the configuration the destination folder name.
Currently, both are storing on the same place and the add-on does not distinguish between the and it will delete snapshots of the other device…

Thanls a lot.

That would be a great feature. I also have two hassio devices.