Sauvegarde de la db de zigbee2mqtt

Testé et approuvé :

  • Installation fraîche
  • Configuration de base et ajout d’un switch ZigBee
  • Attente de la sauvegarde automatique de 23h
  • Arrêt des conteneurs
  • Suppression des sous-dossiers présents dans /Var/lib/gladysassistant et de tous les conteneurs
  • Redémarrage du conteneur Gladys
    Et tout redevient comme avant, ZigBee est fonctionnel!
    Les logs :
    A 23h :
2022-11-23T23:00:00+0100 <info> backup.js:39 (Zigbee2mqttManager.backup) Zigbee2MQTT request for backup
2022-11-23T23:00:00+0100 <warn> handleMqttMessage.js:84 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt topic zigbee2mqtt/bridge/request/backup empty message.
2022-11-23T23:00:10+0100 <info> device.calculateAggregate.js:105 (ChildProcess.<anonymous>) device.calculateAggregate: Finishing processing for interval hourly
2022-11-23T23:00:10+0100 <info> device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feature state for interval daily
2022-11-23T23:00:12+0100 <info> saveZ2mBackup.js:12 (Zigbee2mqttManager.saveZ2mBackup) Zigbee2mqtt: storing backup...
2022-11-23T23:00:13+0100 <info> saveZ2mBackup.js:24 (Zigbee2mqttManager.saveZ2mBackup) Zigbee2mqtt: backup stored

Après suppression et redémarrage

>gladys-server@ start:prod /src/server
> cross-env NODE_ENV=production node index.js

2022-11-23T23:17:31+0100 <info> job.purge.js:17 (Job.purge) Deleting all background jobs created before = Wed Nov 16 2022 23:17:31 GMT+0100 (Central European Standard Time)
Initialising OpenZWave 1.6.0 binary addon for Node.JS.
        OpenZWave Security API is ENABLED
        ZWave device db    : /usr/local/etc/openzwave
        User settings path : /src/server/services/zwave/node_modules/openzwave-shared/build/Release/../../
        Option Overrides : --Logging false --ConsoleOutput false --SaveConfiguration true
2022-11-23T23:17:43+0100 <info> index.js:14 (Object.start) starting Alexa service
2022-11-23T23:17:43+0100 <info> index.js:21 (Object.start) Starting example service
2022-11-23T23:17:44+0100 <info> index.js:20 (Object.start) Starting Open Weather service
2022-11-23T23:17:44+0100 <info> service.start.js:40 (Service.start) Service openweather is not configured, so it was not started.
2022-11-23T23:17:44+0100 <info> index.js:88 (Object.start) Starting CalDAV service
2022-11-23T23:17:44+0100 <info> index.js:16 (Object.start) starting Broadlink service
2022-11-23T23:17:44+0100 <info> index.js:18 (Object.start) Starting HomeKit service
2022-11-23T23:17:45+0100 <info> index.js:14 (Object.start) starting GoogleActions service
2022-11-23T23:17:46+0100 <info> init.js:39 (Zigbee2mqttManager.init) Zigbee2mqtt USB dongle attached to /dev/ttyUSB0
2022-11-23T23:17:46+0100 <info> installMqttContainer.js:28 (Zigbee2mqttManager.installMqttContainer) MQTT broker is being installed as Docker container...
2022-11-23T23:17:46+0100 <info> installMqttContainer.js:29 (Zigbee2mqttManager.installMqttContainer) Pulling eclipse-mosquitto:2 image...
2022-11-23T23:17:47+0100 <info> installMqttContainer.js:33 (Zigbee2mqttManager.installMqttContainer) Preparing broker environment...
2022-11-23T23:17:47+0100 <info> installMqttContainer.js:40 (Zigbee2mqttManager.installMqttContainer) Creating container with data in "/var/lib/gladysassistant" on host...
2022-11-23T23:17:49+0100 <info> installMqttContainer.js:54 (Zigbee2mqttManager.installMqttContainer) MQTT broker is restarting...
2022-11-23T23:17:55+0100 <info> installMqttContainer.js:61 (Zigbee2mqttManager.installMqttContainer) Creating user/pass...
2022-11-23T23:17:56+0100 <info> installMqttContainer.js:70 (Zigbee2mqttManager.installMqttContainer) MQTT broker is restarting...
2022-11-23T23:18:03+0100 <info> installMqttContainer.js:74 (Zigbee2mqttManager.installMqttContainer) MQTT broker container successfully started and configured
2022-11-23T23:18:03+0100 <info> restoreZ2mBackup.js:26 (Zigbee2mqttManager.restoreZ2mBackup) Zigbee2mqtt: loading z2m backup...
2022-11-23T23:18:03+0100 <info> restoreZ2mBackup.js:29 (Zigbee2mqttManager.restoreZ2mBackup) Restoring zigbee2mqtt configuration...
2022-11-23T23:18:03+0100 <info> installZ2mContainer.js:34 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt is being installed as Docker container...
2022-11-23T23:18:03+0100 <info> installZ2mContainer.js:35 (Zigbee2mqttManager.installZ2mContainer) Pulling koenkk/zigbee2mqtt:latest image...
2022-11-23T23:18:05+0100 <info> installZ2mContainer.js:38 (Zigbee2mqttManager.installZ2mContainer) Configuration of Device /dev/ttyUSB0
2022-11-23T23:18:05+0100 <info> installZ2mContainer.js:43 (Zigbee2mqttManager.installZ2mContainer) Creation of container...
2022-11-23T23:18:08+0100 <info> installZ2mContainer.js:46 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt successfully installed and configured as Docker container
2022-11-23T23:18:08+0100 <info> installZ2mContainer.js:59 (Zigbee2mqttManager.installZ2mContainer) Preparing Zigbee2mqtt environment...
2022-11-23T23:18:08+0100 <info> installZ2mContainer.js:72 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt container is starting...
2022-11-23T23:18:14+0100 <info> installZ2mContainer.js:78 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt container successfully started
2022-11-23T23:18:14+0100 <info> connect.js:14 (Zigbee2mqttManager.connect) Connecting Gladys to mqtt://localhost:1884 MQTT broker...
2022-11-23T23:18:15+0100 <info> connect.js:24 (MqttClient.<anonymous>) Connected to MQTT container mqtt://localhost:1884
2022-11-23T23:18:15+0100 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#
2022-11-23T23:18:15+0100 <info> index.js:18 (Object.start) Starting TP-Link service
2022-11-23T23:18:15+0100 <info> index.js:17 (Object.start) Starting eWeLink service
2022-11-23T23:18:15+0100 <info> service.start.js:40 (Service.start) Service ewelink is not configured, so it was not started.
2022-11-23T23:18:16+0100 <info> index.js:15 (Object.start) Starting Bluetooth service
2022-11-23T23:18:18+0100 <error> index.js:20 (process.<anonymous>) uncaughtException catched: uncaughtException
2022-11-23T23:18:18+0100 <error> index.js:21 (process.<anonymous>) Error: ENODEV, No such device
    at Hci.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/hci.js:100:35)
    at NobleBindings.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:78:13)
    at /src/server/services/bluetooth/node_modules/@abandonware/noble/lib/noble.js:60:24
    at processTicksAndRejections (internal/process/task_queues.js:77:11) {
  errno: 19,
  code: 'ENODEV',
  syscall: 'bind'
}
2022-11-23T23:18:18+0100 <info> index.js:15 (Object.start) Starting Tasmota service
2022-11-23T23:18:18+0100 <info> index.js:16 (Object.start) Starting zwave service
2022-11-23T23:18:18+0100 <info> service.start.js:40 (Service.start) Service zwave is not configured, so it was not started.
2022-11-23T23:18:18+0100 <info> index.js:14 (Object.start) Starting Xiaomi service
2022-11-23T23:18:18+0100 <info> index.js:13 (Object.start) Starting usb service
2022-11-23T23:18:18+0100 <info> index.js:19 (Object.start) Starting Telegram service
2022-11-23T23:18:18+0100 <info> service.start.js:40 (Service.start) Service telegram is not configured, so it was not started.
2022-11-23T23:18:18+0100 <info> index.js:16 (Object.start) Starting RTSP service
2022-11-23T23:18:18+0100 <info> index.js:18 (Object.start) Starting Philips Hue service
2022-11-23T23:18:19+0100 <info> index.js:16 (Object.start) Starting MQTT service
2022-11-23T23:18:19+0100 <info> updateContainer.js:13 (MqttHandler.updateContainer) MQTT: checking for required changes...
2022-11-23T23:18:19+0100 <info> service.start.js:40 (Service.start) Service mqtt is not configured, so it was not started.
2022-11-23T23:18:19+0100 <info> scene.dailyUpdate.js:58 () Sunrise today is at 8:10 today, in your timezone = Europe/Paris
2022-11-23T23:18:19+0100 <info> scene.dailyUpdate.js:59 () Sunset today is at 16:50 today, in your timezone = Europe/Paris

Demain, je teste avec ma db de prod.
Good job !

1 « J'aime »