Add-on: Home Assistant Google Drive Backup

Yes that was indeed the case. Recently, I had configured Frigate for motion detection on 8 cameras so the media folder was full of snapshots and video clips from motion detection.

Just had to exclude “media” folder from the backup and everything seems working fine now!!

I have a bit of experience in this realm, I’m not sure what can be done about it, but here is the info anyway

So…the db-journal file is a temporary file. When a program is writing to its db, by default the db creates a temp file named -journal to store changes before they are committed to the actual db…so, what it seems like is happening here is that the backup program is identifying all of the files that need to be backed up, but by the time the backup comes around to actually backup the journal file, it’s gone because the changes have been committed to the db…so it’s throwing an error. So…when it retries later, the journal file isn’t there when it does the file scan…so it succeeds. As described before, the only real way to ensure that there aren’t any temp files is to stop the addon that’s ‘busy’…

Hi, maybe is already explained, but after check I did not find.
I want to inspect some config files in my backup, but that is secured with password.
What is the way to unpack the backup file with the password ? I try with 7zip, or winrar but I can not write password and the result is amlformat file
Thanks a lot

Its an unusual format that you can’t open with normal tools. I don’t know why Home Assistant choose that format. I’ve written a command line tool that decrypts backups here.

2 Likes

I have a partially responsive HA setup on a Pi4. I have Backups and Google Drive setup in my HA and luckily it is one of the few things I can get to sometimes load properly.

I have a backup I want to restore, but the file is on my computer. I cant figure out how to “upload” the backup .tar file to my HA. I put it in the correct folder on my Google Drive, but the HA Backups do not find the files, even after “sync” is done many times.

I also cant get Samba share to work, so I cant import the backup file that way.

Any ideas on how I can get my backup file onto my Pi?

One “solution” (kind of) is to spin up a brand new fresh HA install on the SD card, install the Samba add-on and then copy the backup across to the fresh HA. From there you can then restore that backup over the “fresh” HA to get back to that old version.

1 Like

If your instance is reachable, you should be able to upload a backup from your PC via the “backup page” in HA. The three-dot-menu in the upper right should offer an “Upload Backup”. :slight_smile:

1 Like

Anyone else having trouble with MariaDB starting back up after upgrading to 2022.8? Before the upgrade this Add-On would stop MariaDB, perform the backup, and then start MariaDB. I’ve noticed that MariaDB stops correctly, but doesn’t start back up. I just upgraded to 2022.8.4, and am going to run a backup and watch the logs to see what is going on. Just wondering if I am the only one…

1 Like

Well after “watching the pot boil” it worked without a hitch. I’ll have to see if tonight during my automated backup if MariaDB comes back up. It might also be a fix in 2022.8.4 vs 2022.8.3 and 2022.8.2.

Hi, I cannot find the 3 dots in the top right or the “Upload Backup” option. All I see is “Actions” which does not have the option

Screen Shot 2022-08-10 at 8.51.09 AM

Screen Shot 2022-08-10 at 8.50.39 AM

You’ll need to go to Home Assistant’s backup Web-ui (eg Settings > System > Backups), not this addon. You’ll find the 3-dot menu to upload a backup from your computer on that page.

1 Like

thanks for clarifying! I see it now

I’ve been having the same issue, but do you mean 2022.8.3, which was released today? I’ve been having the issue ever since 2022.8.0. I guess I’ll see if it was fixed, but it’s most likely a supervisor issue.

Supervisor was updated a few hours ago as well. :slight_smile: It is now ‘2022.08.3

@sabeechen , I have been using this integration for a little while and it has totally saved my butt at least twice. My HA runs on an RPI 4b in a docker container (as I have other things running on the pi in addition to HA). Twice, (my) work on those Non-HA items have trashed my RPI, and each time I restored the RPI from a (not so recent) full backup, followed by restoring the most recent HA Google Drive backup from my Google account. Each time it was F.L.A.W.L.E.S.S.!

1 Like

I’m on the latest of both and no longer seeing the issue. :tada:Yeah, I meant 2022.08.3
image

1 Like

Hi,
Since last update of Supervisor 2022.08.3 I am suffering problems with this add-on.
After building a Backup, the system does not recupere (specialy recorder as well as other addons like maria db, influx, zigbee2mqtt, mosquito…).

Error executing query SELECT table_schema "database", Round(Sum(data_length + index_length) / 1048576, 1) "value" FROM information_schema.tables WHERE table_schema="homeassistant" GROUP BY table_schema LIMIT 1;: (MySQLdb.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: SELECT table_schema "database", Round(Sum(data_length + index_length) / 1048576, 1) "value" FROM information_schema.tables WHERE table_schema="homeassistant" GROUP BY table_schema LIMIT 1;] (Background on this error at: https://sqlalche.me/e/14/e3q8)
10:50:16 – (ERROR) SQL - el mensaje se produjo por primera vez a las 10:04:46 y aparece 61 veces
Timeout fetching Pruficador3H data
10:46:23 – (ERROR) Xiaomi Miio - el mensaje se produjo por primera vez a las 14 de agosto de 2022, 11:08:11 y aparece 40 veces
Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 403
10:45:06 – (ERROR) Google Assistant - el mensaje se produjo por primera vez a las 14 de agosto de 2022, 11:04:13 y aparece 206 veces
Cannot connect to InfluxDB due to 'HTTPConnectionPool(host='localhost', port=8086): Max retries exceeded with url: /write?db=HA_long_term (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f64c0fe97e0>: Failed to establish a new connection: [Errno 111] Connection refused'))'. Please check that the provided connection details (host, port, etc.) are correct and that your InfluxDB server is running and accessible.
10:32:59 – (ERROR) InfluxDB - el mensaje se produjo por primera vez a las 10:06:08 y aparece 2 veces
Unhandled database error while processing task KeepAliveTask(): (MySQLdb.OperationalError) (2005, "Unknown MySQL server host 'core-mariadb' (-2)") (Background on this error at: https://sqlalche.me/e/14/e3q8)
10:32:23 – (ERROR) Recorder - el mensaje se produjo por primera vez a las 10:04:56 y aparece 56 veces
Unhandled database error while processing task EventTask(event=<Event state_changed[L]: entity_id=sensor.ble_battery_box_3, old_state=<state sensor.ble_battery_box_3=92; state_class=measurement, sensor_type=ATC, mac_address=A4:C1:38:EA:C6:81, last_packet_id=245, firmware=ATC (Atc1441), uuid=A4:C1:38:EA:C6:81, rssi=-53, unit_of_measurement=%, device_class=battery, friendly_name=ble battery Box 3 @ 2022-08-15T10:31:19.772742+02:00>, new_state=<state sensor.ble_battery_box_3=92; state_class=measurement, sensor_type=ATC, mac_address=A4:C1:38:EA:C6:81, last_packet_id=246, firmware=ATC (Atc1441), uuid=A4:C1:38:EA:C6:81, rssi=-59, unit_of_measurement=%, device_class=battery, friendly_name=ble battery Box 3 @ 2022-08-15T10:32:20.564742+02:00>>): (MySQLdb.OperationalError) (2005, "Unknown MySQL server host 'core-mariadb' (-2)") (Background on this error at: https://sqlalche.me/e/14/e3q8)
10:32:22 – (ERROR) Recorder - el mensaje se produjo por primera vez a las 10:04:37 y aparece 4058 veces
Unhandled database error while processing task EventTask(event=<Event call_service[L]: domain=script, service=tv_altavoz_denon, service_data=>): (MySQLdb.OperationalError) (2005, "Unknown MySQL server host 'core-mariadb' (-2)") (Background on this error at: https://sqlalche.me/e/14/e3q8)
10:30:36 – (ERROR) Recorder - el mensaje se produjo por primera vez a las 10:30:22 y aparece 13 veces
Error executing statistics: (MySQLdb.OperationalError) (2005, "Unknown MySQL server host 'core-mariadb' (-2)") (Background on this error at: https://sqlalche.me/e/14/e3q8)
10:30:13 – (ADVERTENCIA) Recorder - el mensaje se produjo por primera vez a las 10:05:10 y aparece 6 veces
Error executing query: (MySQLdb.OperationalError) (2005, "Unknown MySQL server host 'core-mariadb' (-2)") (Background on this error at: https://sqlalche.me/e/14/e3q8)
10:30:13 – (ERROR) Recorder - el mensaje se produjo por primera vez a las 10:05:10 y aparece 6 veces

I have to unplug and plug the NUC power cable to solve the situation.

I can make backups using the UI without problems. They appair only when the addon is involved.

Someone knows how to fix it?

Thank you

I have the same problem.

Yeah, it doesn’t happen every time but I am still experiencing issues with MariaDB not coming back online.

This turned out to be a bug. Newer versions of the supervisor sometimes report the status of an addon as “error” rather than “stopped” after being stopped, I’m not sure why. When restarting addons, this addon wasn’t sure what to do with the “error” state and so it would never start back up.

The latest version of the addon, v0.108.3, should fix this however I still would recommend that you just don’t stop other addons while taking a backup. Home Assistant has logic built into most addons now that prepare them approriately for backup and handle it automatically. MariaDB, for example, freezes the database during backup automatically which is much less disruptive than shutting it down.

5 Likes