Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Backup Restore in Container

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Backup Restore in Container

    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Modjo last edited by Modjo

      Liebe Community,

      ich bin gerade dabei meinen bestehenden Raspberry Pi gegen einen neuen auszutauschen. Da ich hier die Installation und Migration so weit wie möglich automatisieren möchte, aber gleichzeitig auch auf Iobroker im Container wechseln möchte, habe ich mir über Ansible ein Playbook geschrieben. Das klappt auch soweit. Problem ist nur, dass der Iobroker im Container nach dem Einspielen des Backups nicht starten möchte.
      Das Vorgehen ist wie folgt:

      1. Kopieren eines Backups in das Container Volume
      2. Starten des Containers
      3. Container erkennt valides Backup
      4. Iobroker startet mit folgendem Fehler nicht in einer Endlosschleife:
      root@iobroker:/opt/iobroker# cat log/iobroker.current.log
      2022-02-21 17:22:47.393  - info: host.iobroker iobroker.js-controller version 3.3.22 js-controller starting
      2022-02-21 17:22:47.399  - info: host.iobroker Copyright (c) 2014-2021 bluefox, 2014 hobbyquaker
      2022-02-21 17:22:47.400  - info: host.iobroker hostname: iobroker, node: v14.19.0
      2022-02-21 17:22:47.400  - info: host.iobroker ip addresses: 172.19.0.2
      2022-02-21 17:22:48.664  - error: host.iobroker Cannot read system.config: null (OK when migrating or restoring)
      2022-02-21 17:23:17.416  - error: host.iobroker No connection to databases possible, restart
      2022-02-21 17:23:17.421  - info: host.iobroker iobroker _restart
      2022-02-21 17:23:17.986  - info: host.iobroker iobroker Starting node restart.js
      2022-02-21 17:23:19.751  - info: host.iobroker iobroker.js-controller version 3.3.22 js-controller starting
      2022-02-21 17:23:19.757  - info: host.iobroker Copyright (c) 2014-2021 bluefox, 2014 hobbyquaker
      2022-02-21 17:23:19.758  - info: host.iobroker hostname: iobroker, node: v14.19.0
      2022-02-21 17:23:19.758  - info: host.iobroker ip addresses: 172.19.0.2
      2022-02-21 17:23:19.894  - error: host.iobroker Cannot read system.config: null (OK when migrating or restoring)
      
      

      Anbei das Log aus dem Container:

      --------------------------------------------------------------------------------
      -------------------------     2022-02-21 17:20:23      -------------------------
      --------------------------------------------------------------------------------
      
      --------------------------------------------------------------------------------
      -----                 Welcome to your ioBroker-container!                  -----
      -----                    Startupscript is now running.                     -----
      -----                          Please be patient!                          -----
      --------------------------------------------------------------------------------
      
      --------------------------------------------------------------------------------
      -----                        Debugging information                         -----
      -----                                                                      -----
      -----                                System                                -----
      -----                    arch:                aarch64                      -----
      -----                                                                      -----
      -----                             Docker-Image                             -----
      -----                    image:               v6.0.0                       -----
      -----                    build:               2022-02-11T07:56:40+00:00    -----
      -----                                                                      -----
      -----                               Versions                               -----
      -----                    node:                v14.19.0                     -----
      -----                    npm:                 6.14.16                      -----
      -----                                                                      -----
      -----                                 ENV                                  -----
      -----                    PACKAGES:            etherwake                    -----
      -----                    SETGID:              1000                         -----
      -----                    SETUID:              1000                         -----
      --------------------------------------------------------------------------------
      
      --------------------------------------------------------------------------------
      -----                  Step 1 of 5: Preparing container                   -----
      --------------------------------------------------------------------------------
      
      Updating Linux packages on first run...
      Reading package lists...
      Building dependency tree...
      Reading state information...
      Reading package lists...
      Building dependency tree...
      Reading state information...
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      Done.
      
      Registering maintenance script as command...
      Done.
      
      Installing additional packages is set by ENV.
      Checking the following Packages: etherwake...
      
      --------------------------------------------------------------------------------
      -------------------------     2022-02-21 17:21:51      -------------------------
      --------------------------------------------------------------------------------
      
      --------------------------------------------------------------------------------
      -----                 Welcome to your ioBroker-container!                  -----
      -----                    Startupscript is now running.                     -----
      -----                          Please be patient!                          -----
      --------------------------------------------------------------------------------
      
      --------------------------------------------------------------------------------
      -----                        Debugging information                         -----
      -----                                                                      -----
      -----                                System                                -----
      -----                    arch:                aarch64                      -----
      -----                                                                      -----
      -----                             Docker-Image                             -----
      -----                    image:               v6.0.0                       -----
      -----                    build:               2022-02-11T07:56:40+00:00    -----
      -----                                                                      -----
      -----                               Versions                               -----
      -----                    node:                v14.19.0                     -----
      -----                    npm:                 6.14.16                      -----
      -----                                                                      -----
      -----                                 ENV                                  -----
      -----                    PACKAGES:            etherwake                    -----
      -----                    SETGID:              1000                         -----
      -----                    SETUID:              1000                         -----
      --------------------------------------------------------------------------------
      
      --------------------------------------------------------------------------------
      -----                  Step 1 of 5: Preparing container                   -----
      --------------------------------------------------------------------------------
      
      Updating Linux packages on first run...
      Reading package lists...
      Building dependency tree...
      Reading state information...
      Reading package lists...
      Building dependency tree...
      Reading state information...
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      Done.
      
      Registering maintenance script as command...
      Done.
      
      Installing additional packages is set by ENV.
      Checking the following Packages: etherwake...
      etherwake is already installed.
      Reading package lists...
      Building dependency tree...
      Reading state information...
      Reading package lists...
      Building dependency tree...
      Reading state information...
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      Done.
      
      --------------------------------------------------------------------------------
      -----             Step 2 of 5: Detecting ioBroker installation             -----
      --------------------------------------------------------------------------------
      
      IoBroker backup file detected in /opt/iobroker.
      Preparing restore...
      Done.
      Restoring ioBroker...
      Done.
      
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      !!!!!                             IMPORTANT NOTE                             !!!!!
      !!!!!        The sartup script restored iobroker from a backup file.         !!!!!
      !!!!! Check /opt/iobroker/log/restore.log to see if restore was successful.  !!!!!
      !!!!! When ioBroker now starts it will reinstall all Adapters automatically. !!!!!
      !!!!!         This might be take a looooong time! Please be patient!         !!!!!
      !!!!!  You can view installation process by taking a look at ioBroker log.   !!!!!
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      
      --------------------------------------------------------------------------------
      -----             Step 3 of 5: Checking ioBroker installation              -----
      --------------------------------------------------------------------------------
      
      (Re)Setting folder permissions (This might take a while! Please be patient!)...
      Done.
      
      Fixing "sudo-bug" by replacing sudo in iobroker with gosu...
      Done.
      
      /opt/scripts/iobroker_startup.sh: line 199: [: !=: unary operator expected
      --------------------------------------------------------------------------------
      -----                Step 4 of 5: Applying special settings                -----
      --------------------------------------------------------------------------------
      
      Some adapters have special requirements/ settings which can be activated by the use of environment variables.
      For more information take a look at readme.md on Github!
      
      --------------------------------------------------------------------------------
      -----                    Step 5 of 5: ioBroker startup                     -----
      --------------------------------------------------------------------------------
      
      Starting ioBroker...
      
      

      Ein anderes Backup File habe ich auch schon ohne Erfolg ausprobiert.

      Vielen Dank vorab für eure Unterstützung!

      wendy2702 1 Reply Last reply Reply Quote 0
      • wendy2702
        wendy2702 @Modjo last edited by

        @modjo Sicher das du nicht einfach nur lange genug wartest?

        Selbst wenn das steht „Restore Done“ heißt das nicht das auch schon alle Adapter, Instanzen etc, fertig installiert wurde.

        Das logfile besser mal mit „tail -f“ beobachten anstelle von „cat“

        M 1 Reply Last reply Reply Quote 0
        • M
          Modjo @wendy2702 last edited by

          @wendy2702 Vielen Dank für deine Anwort.
          Ich denke schon, da ich es schon 2x jeweils über Nacht laufen lassen habe.

          wendy2702 1 Reply Last reply Reply Quote 0
          • wendy2702
            wendy2702 @Modjo last edited by

            @modjo OK. Kann man ja nicht wissen. Warum Container auf einem PI?

            Wie ist denn jetzt gerade der aktuelle status?

            Was kommt den aktuell bei:

            iob v
            iob list instances
            iob update
            
            M 1 Reply Last reply Reply Quote 0
            • M
              Modjo @wendy2702 last edited by

              @wendy2702 Weil ich darauf noch andere Container, wie z.B. Grafana, etc. laufen lassen möchte und ein Pi4 mit 8 GB Ram sonst nicht effizient genutzt wird.
              Anbei die Ausgabe der Befehle:

              root@iobroker:~# iob v
              3.3.22
              root@iobroker:~# iob list instances
               Cannot read system.config: null (OK when migrating or restoring)
              No connection to states 127.0.0.1:6379[redis]
              root@iobroker:~# iob update
               Cannot read system.config: null (OK when migrating or restoring)
              No connection to states 127.0.0.1:6379[redis]
              
              

              Gruß

              wendy2702 1 Reply Last reply Reply Quote 0
              • wendy2702
                wendy2702 @Modjo last edited by

                @modjo OK.

                Ist der Hostname zur alten Installation identisch?

                Läuft aktuell ein restore?

                Wenn nicht:

                iob stop
                

                Wobei er eigentlich eh nicht laufen sollte aber egal.

                Dann prüfen ob kein iobroker Prozess mehr aktiv ist

                ps auxww|grep io
                

                Dann:

                cd /opt/iobroker/
                
                npm install iobroker.js-controller@3.3.22
                
                

                Probieren ob iob sauber startet: Logfile beobachten

                Zur Sicherheit nochmal

                iob fix
                

                Wenn dann erstmal alles OK ist nochmal bitte das restore probieren.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                Support us

                ioBroker
                Community Adapters
                Donate
                FAQ Cloud / IOT
                HowTo: Node.js-Update
                HowTo: Backup/Restore
                Downloads
                BLOG

                859
                Online

                31.9k
                Users

                80.1k
                Topics

                1.3m
                Posts

                2
                6
                364
                Loading More Posts
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes
                Reply
                • Reply as topic
                Log in to reply
                Community
                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                The ioBroker Community 2014-2023
                logo