Add-on: Home Assistant Google Drive Backup

@nikee just to make sure I understand correctly:

  • You’re seeing the snapshot time in the name of the snapshot drift about a minute every day.
  • You’re certain you have snapshot_time_of_day: '12:00' in the addon’s settings.

The snapshot time can drift a few seconds with every snapshot if you don’t set snapshot_time_of_day but even then only a few seconds. It should never drift if you have snapshot_time_of_day set. If you’re still seeing this could you open an issue on the issue tracker and post your configuration and logs after it makes a snapshot (use the “LOGS” link in the web-ui to get the debug logs)? It’ll be easier to go back and forth there.

I see your plugin tries to sync to Google every hour.
I make snapshots only once a day.

Can we lower the Google Sync rate somehow?

You know, I’ve always thought it should be but you’re literally the first person to ask. I’ve made this issue to track it and I’ll aim to include it in the next release.

How did you move the database? Is this the default one or via an add-on? My .db is a few GB so need to do something similar

Hi do you know why I get this error trying to install this addon

0-03-19 13:34:54 INFO (SyncWorker_13) [hassio.docker.interface] Pull image sabeechen/hassio-google-drive-backup-amd64 tag 0.100.0.
20-03-19 13:34:54 ERROR (SyncWorker_13) [hassio.docker.interface] Can’t install sabeechen/hassio-google-drive-backup-amd64:0.100.0 -> 500 Server Error: Internal Server Error (“Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:56220->[::1]:53: read: connection refused”).
20-03-19 13:34:56 INFO (SyncWorker_0) [hassio.docker.interface] Pull image sabeechen/hassio-google-drive-backup-amd64 tag 0.100.0.
20-03-19 13:34:56 ERROR (SyncWorker_0) [hassio.docker.interface] Can’t install sabeechen/hassio-google-drive-backup-amd64:0.100.0 -> 500 Server Error: Internal Server Error (“Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:45483->[::1]:53: read: connection refused”).

Now have a different error

20-03-19 14:01:35 ERROR (SyncWorker_10) [hassio.docker.interface] Can’t install sabeechen/hassio-google-drive-backup-amd64:0.100.0 -> 500 Server Error: Internal Server Error (“Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)”).
20-03-19 14:02:14 INFO (SyncWorker_18) [hassio.docker.interface] Pull image sabeechen/hassio-google-drive-backup-amd64 tag 0.100.0.
20-03-19 14:02:29 ERROR (SyncWorker_18) [hassio.docker.interface] Can’t install sabeechen/hassio-google-drive-backup-amd64:0.100.0 -> 500 Server Error: Internal Server Error (“Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)”).

this is the snippet from my configuration.yaml file.

recorder:
purge_keep_days: 5
db_url: sqlite:////config/database/hassIO_v2.db

Use your favorite command line processor to create the directory “database” OR us the /share directory that’s already there in hassio.

ie:
cd /config
mkdir database

Now that my installation is running, this is what I see in the folder:
config $ cd database
database $ ls -al
total 1557204
drwxr-xr-x 2 root root 4096 Mar 19 10:15 .
drwxr-xr-x 18 root root 4096 Mar 19 10:14 …
-rw-r–r-- 1 root root 1594568704 Mar 19 10:15 hassIO_v2.db

This only relocates the .db file somewhere other than the /config folder, but allows me to ignore the folder with the backup/snapshot add-in.

Moving the file to a different device has been discussed in this forum under a different thread, more than I was willing to do at this time.

FWIW, the snapshot test created a backup ~700Mb vs ~1.4Gb.

1 Like

@Sabeechen

i’m having problems with restoring a snapshot

all went well except 1 addon which didnt restore: unifi

i get this error

20-04-11 07:36:21 INFO (MainThread) [supervisor.addons.addon] Restore config for addon a0d7b954_unifi
20-04-11 07:36:21 INFO (MainThread) [supervisor.addons.addon] Restore/Install image for addon a0d7b954_unifi
20-04-11 07:36:21 INFO (SyncWorker_5) [supervisor.docker.interface] Pull image hassioaddons/unifi-armv7 tag 0.14.0.
20-04-11 07:37:09 INFO (SyncWorker_1) [supervisor.docker.interface] Cleanup images: ['hassioaddons/unifi-armv7:0.14.1']
20-04-11 07:37:11 INFO (MainThread) [supervisor.addons.addon] Restore data for addon a0d7b954_unifi
20-04-11 07:38:30 ERROR (MainThread) [supervisor.addons.addon] Can't restore origin data: [('/data/tmp/tmph_b26vb1/data/unifi/data/backup', '/data/addons/data/a0d7b954_unifi/unifi/data/backup', "[Errno 2] No such file or directory: '/data/tmp/tmph_b26vb1/data/unifi/data/backup'")]
20-04-11 07:38:31 ERROR (MainThread) [supervisor.snapshots.snapshot] Can't restore snapshot for a0d7b954_unifi
20-04-11 07:38:31 INFO (MainThread) [supervisor.snapshots] Partial-Restore 1ad90014 done

i tried a second time with a snapshot that did restore the unifi addon and data
but same problem now with that snapshot too

any ideas?

Strange,

i went for a bike run with my kid.
I came back, and now i watch my HA setup , suddenly i see the unifi addon is back , i launched webgui and all is there…
Very strange

Didnt do a thing !

Having problems with port numbers, I open my homeassistant with duckdns.org:8130 and port forwarding directs it to the ip address:8123, when I try to restore a snapshot the addon tries to open duckdns:8123 and fails because I get in via duckdns:8130, is there any reason why it is suddenly doing this, previously it was fine.

The restore link in the addon just takes you to the Supervisor’s snapshot page, so you can navigate there normally (Supervisor > Snapshots). Because of all the different ways Home Assistant can be configured, proxied, etc, it can actually be difficult for an addon to figure out what the “real” address of the machine is. It does its best but doesn’t always work.

I created a portforwarding rule for that and it works, not sure why it defailts to port 8123 now, will just use the rule for now

Hello,

Having trouble to restore a snapshot.
The install of the app went wel, everything seems to work the way it should be, but when i upload a snapshot (not created by the addon) to the “backup” folder on google drive i can’t see it in the app in Home Assistant when i sync…
Am i doing something wrong?

Thanks!!

The addon can only see the snapshots in Google Drive that it created (this is becauseof how its relationship with Drive works, I can go into more detail if you’d like to know why). If you want to get that snapshot into the addon, you’ll need to move it into Home assistant’s “/backup” folder using the Samba addon or something else that lets you access the files there.

In the future, I might be able to add a dialog that lets you “Import” a snapshot like this from Drive.

Sabeechen,

Samba works 5 out of 10 times, uploaded the snapshot to the backup folder, all went oke.
From now on i will make all my snapshots with your addon, saver for as samba don’t want to work!

Thanks :slight_smile:

I’m trying to install this add-on, but I’m getting an error when I try to add the repository URL to HACS
image.

This is the url I’m trying to add:

https://github.com/sabeechen/hassio-google-drive-backup

Not a particularly helpful error from HACS as it isn’t specific about what’s missing. Anyone else seeing this?

It is not a hacs add-on, but a hassio add-on. Add it under supervisor.

Oh dear, I’m an idiot / it’s been a long day!

Thanks for clarifying

confirming that this works like a sharm thumbs up developer!!!

update your hassio to latest version and install it in the supervisor NOT ON HACS