esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
292 stars 36 forks source link

Hass.io backup (Create snapshot) including esphome-dev takes more than 20 minutes #767

Closed apolselli closed 5 years ago

apolselli commented 5 years ago

Operating environment/Installation (Hass.io/Docker/pip/etc.):

Hass.io on Raspberry Pi 4B (Hass.io Version 189 on HassOS 3.5)

ESP (ESP32/ESP8266, Board/Sonoff):

M5StickC (ESP32) and Sonoff Basic (ESP8266)

Affected component:

esphome-dev Hass.io add-on

Description of problem: The backup (hassio -> snapshots -> create snapshot) of the ESPHome (dev) addon takes more than 20 minutes. Is there a way to let it ignore the thousands of files that the esphome-dev addon uses just to build itself and/or the firmware images?

Problem-relevant YAML-configuration entries:

Logs (if applicable):

19-10-23 08:10:15 INFO (MainThread) [hassio.snapshots] Full-Snapshot cfac3711 start
19-10-23 08:10:15 INFO (MainThread) [hassio.snapshots] Snapshot cfac3711 store Add-ons
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Build snapshot for add-on core_duckdns
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Build snapshot for add-on a0d7b954_portainer
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Build snapshot for add-on core_nginx_proxy
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Build snapshot for add-on a0d7b954_ssh
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Build snapshot for add-on 7ad98f9c_zigbee2mqtt
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Build snapshot for add-on a0d7b954_glances
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Build snapshot for add-on core_mosquitto
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Build snapshot for add-on core_configurator
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Build snapshot for add-on 03d23610_dasshio
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Finish snapshot for addon core_nginx_proxy
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Finish snapshot for addon 7ad98f9c_zigbee2mqtt
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Finish snapshot for addon a0d7b954_glances
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Finish snapshot for addon 03d23610_dasshio
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Finish snapshot for addon core_configurator
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Finish snapshot for addon core_mosquitto
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Finish snapshot for addon a0d7b954_ssh
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Finish snapshot for addon core_duckdns
19-10-23 08:10:15 INFO (MainThread) [hassio.addons.addon] Finish snapshot for addon a0d7b954_portainer
19-10-23 08:12:33 INFO (SyncWorker_13) [hassio.docker.addon] Export image 15ef4d2f/armv7-addon-esphome-dev to /data/tmp/tmpdlhy3kz9/image.tar
19-10-23 08:13:48 INFO (SyncWorker_19) [hassio.docker.interface] Stop addon_core_duckdns application
19-10-23 08:14:03 INFO (SyncWorker_19) [hassio.docker.interface] Clean addon_core_duckdns application
19-10-23 08:14:14 INFO (SyncWorker_18) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-duckdns with version 1.10
19-10-23 08:15:03 INFO (SyncWorker_13) [hassio.docker.addon] Export image 15ef4d2f/armv7-addon-esphome-dev done
19-10-23 08:15:03 INFO (MainThread) [hassio.addons.addon] Build snapshot for add-on 15ef4d2f_esphome-dev
19-10-23 08:29:51 INFO (MainThread) [hassio.addons.addon] Finish snapshot for addon 15ef4d2f_esphome-dev
19-10-23 08:29:51 INFO (MainThread) [hassio.snapshots] Snapshot cfac3711 store folders
19-10-23 08:29:51 INFO (SyncWorker_17) [hassio.snapshots.snapshot] Snapshot folder ssl
19-10-23 08:29:51 INFO (SyncWorker_8) [hassio.snapshots.snapshot] Snapshot folder addons/local
19-10-23 08:29:51 INFO (SyncWorker_10) [hassio.snapshots.snapshot] Snapshot folder homeassistant
19-10-23 08:29:51 INFO (SyncWorker_6) [hassio.snapshots.snapshot] Snapshot folder share
19-10-23 08:29:51 INFO (SyncWorker_8) [hassio.snapshots.snapshot] Snapshot folder addons/local done
19-10-23 08:29:51 INFO (SyncWorker_17) [hassio.snapshots.snapshot] Snapshot folder ssl done
19-10-23 08:29:53 INFO (SyncWorker_6) [hassio.snapshots.snapshot] Snapshot folder share done
19-10-23 08:31:01 INFO (SyncWorker_10) [hassio.snapshots.snapshot] Snapshot folder homeassistant done
19-10-23 08:31:32 INFO (MainThread) [hassio.snapshots] Full-Snapshot cfac3711 done

Additional information and things you've tried: When I do a Partial snapshot and exclude ESPHome (dev), the whole snapshot completes in less than 1 minute.

OttoWinter commented 5 years ago

Yeah that's because Hass.io has no good folder to store build files under. So currently they're saved in the add-on's data folder until Hass.io adds a better mechanism.

But, you can just deselect ESPHome from the backup list. All files that would need to be backed up are stored in the config folder anyway.