Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [gelöst] Backup und Restore

    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

    [gelöst] Backup und Restore

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

      Hi Leute,

      ich habe gerade nach der Anleitung aus den FAQ ein Backup vom IoBroker erstellt und per SFTP vom Raspi geholt.

      Dabei ist mir aufgefallen, dass das Backup nur 253,3KB hat - ist das normal? Ist da wirklich alles drin was ich brauch um ein Restore vom IoBroker und dem VIS bzw. allem was ich im IoBroker angepasst, eingestellt und an Scripten geschrieben habe, wiederherstellen zu können?

      Da in der FAQ nur was zu Backup aber nicht zum Restore zu finden war noch die Frage:

      Wie müsste ich im Falle des Falles denn zum Restore vorgehen? (laufender Raspi vorrausgesetzt)

      Danke euch!

      Mario

      1 Reply Last reply Reply Quote 0
      • S
        Solear last edited by

        Hallo,

        ja das ist richtig so.

        Ich habe es eben durchprobiert mit einem Umzug von VM zu Raspi.

        Du erstellst ein Backup mit folgender Eingabe im Terminal:

        iobroker backup
        

        Jetzt ist im Verzeichnis /opt/iobroker/backups eine tar.gz Datei. Die sicherst du dir am besten weg. Da die so klein ist, kann man die auch an sich selbst per Mail ab und an senden. Nichts ist schlimmer als seine ganzen Skripte zu verlieren, also ruhig machen.

        Zur Wiederherstellung habe ich ein jungfräuliches iobroker auf dem Raspi nach der bekannten Anleitung erstellt:

        http://www.iobroker.net/docu/?page_id=5106&lang=de

        Dann die Backupdatei wieder einkopiert (der Backup-Ordner existiert noch nicht, ihn also da bei /opt/iobroker/backups anlegen).

        Jetzt im Terminal die Befehle eingeben (https://github.com/ioBroker/ioBroker/wi … ker-backup😞

        sudo iobroker stop

        sudo iobroker restore 0 [restore 0 sagt, nehme letzte Backup]

        iobroker start all [Adapter werden aktiviert]

        sudo iobroker start

        Jetzt eine Weile warten! Ganz wichtig! Man kann sich auf die admin-Webseite einloggen und sieht im Log dann, wie er nach und nach die Adapter automatisch installiert. Wenn sich alles beruhigt hat, die Adaptereinstellungen nochmal durchgehen. Ich musste nur beim Adapter hm-rpc die richtige CCU2-IP auswählen. Und in der Telegramm App das Passwort noch einmal neu bestätigen.

        Es sind alle Einstellungen, Adaptereinstellungen und Skripte fehlerfrei bei mir übernommen worden. Wie das mit VIS aussieht weiß ich nicht, ich nutze VIS nicht.

        1 Reply Last reply Reply Quote 0
        • M
          mariohbs last edited by

          Super und vielen Dank!

          War hauptsächlich wegen der geringen Größe irritiert.

          Werde die Tage mal ne 2. Karte für den PI besorgen und das dann auch mal in real Testen.

          Gruß

          Mario

          1 Reply Last reply Reply Quote 0
          • lobomau
            lobomau last edited by

            @Solear:

            …. Wie das mit VIS aussieht weiß ich nicht, ich nutze VIS nicht. `
            mit VIS klappt genauso auch das backup zu restoren.

            1 Reply Last reply Reply Quote 0
            • C
              chemieka last edited by

              Bedeutet mit dem einen Backup sind auch die Visualisierung wieder da oder muss man ein zweites Backup machen für die Visu. und wenn ja wie?

              1 Reply Last reply Reply Quote 0
              • Homoran
                Homoran Global Moderator Administrators last edited by

                Ich hab es jetzt auch mal getestet.

                Views sind auch alle da.

                Nur nicht die geloggten Daten.

                Ich war sogar ganz mutig und habe ein Cross-Platform restore gemacht, also das backup vom BananaPi M3 auf einen Cubietruck gezogen. Das gab einige (lösbare) Komplikationen, da der Cubie auch eine andere IP und einen anderen Hostnamen hatte.

                Gruß

                Rainer

                1 Reply Last reply Reply Quote 0
                • C
                  chemieka last edited by

                  Skripte werden auch dabei sein oder?

                  Fehlen wird wohl die Szenen im Szenen Adapter.

                  Und eben die Historischen Werte aber da könnte man den Ordner kopieren.

                  1 Reply Last reply Reply Quote 0
                  • S
                    SigiMOE last edited by

                    hi,

                    ich habe folgendes in der Konsole eingegeben :

                    root@raspberrypi:~# sudo iobroker stop
                    Stopping iobroker controller daemon...
                    iobroker controller daemon stopped.
                    Exit code for "killall.sh": 0
                    root@raspberrypi:~# iobroker backup
                    

                    wie lange dauert es im schnitt bis der Vorgang beendet ist und die Datei im Backup Verzeichnis liegt ?

                    1 Reply Last reply Reply Quote 0
                    • M
                      mariohbs last edited by

                      Bei mir war die Datei nach wenigen Sekunden da, allerdings hatte ich den IoBroker nicht gestoppt.

                      Sollte man das?

                      1 Reply Last reply Reply Quote 0
                      • S
                        SigiMOE last edited by

                        keine Ahnung, ob man es muss…..

                        aber bei mir geht es definitiv nicht....

                        weder als root

                        root@raspberrypi:~# iobroker backup
                        /opt/iobroker/node_modules/tar.gz/node_modules/bluebird/js/main/generators.js:62
                                var maybePromise = tryConvertToPromise(value, this._promise�;
                                                                                           ^
                        SyntaxError: Invalid or unexpected token
                            at Object.exports.runInThisContext (vm.js:76:16)
                            at Module._compile (module.js:542:28)
                            at Object.Module._extensions..js (module.js:579:10)
                            at Module.load (module.js:487:32)
                            at tryModuleLoad (module.js:446:12)
                            at Function.Module._load (module.js:438:3)
                            at Module.require (module.js:497:17)
                            at require (internal/module.js:20:19)
                            at module.exports (/opt/iobroker/node_modules/tar.gz/node_modules/bluebird/js/main/promise.js:721:1)
                            at Object. <anonymous>(/opt/iobroker/node_modules/tar.gz/node_modules/bluebird/js/main/bluebird.js:9:39)
                            at Module._compile (module.js:570:32)
                            at Object.Module._extensions..js (module.js:579:10)
                            at Module.load (module.js:487:32)
                            at tryModuleLoad (module.js:446:12)
                            at Function.Module._load (module.js:438:3)
                            at Module.require (module.js:497:17)
                        root@raspberrypi:~#</anonymous> 
                        

                        und auch als pi

                        user

                        pi@raspberrypi:~ $ iobroker backup
                        fs.js:640
                          return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                                         ^
                        
                        Error: EACCES: permission denied, open '/opt/iobroker/node_modules/iobroker.js-controller/tmp/backup/backup.json'
                            at Error (native)
                            at Object.fs.openSync (fs.js:640:18)
                            at Object.fs.writeFileSync (fs.js:1333:33)
                            at /opt/iobroker/node_modules/iobroker.js-controller/lib/setup/setupBackup.js:253:24
                            at Socket. <anonymous>(/opt/iobroker/node_modules/iobroker.js-controller/lib/states/statesInMemClient.js:150:27)
                            at Socket.onack (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:312:9)
                            at Socket.onpacket (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:236:12)
                            at Manager. <anonymous>(/opt/iobroker/node_modules/component-bind/index.js:21:15)
                            at Manager.Emitter.emit (/opt/iobroker/node_modules/socket.io-client/node_modules/component-emitter/index.js:133:20)
                            at Manager.ondecoded (/opt/iobroker/node_modules/socket.io-client/lib/manager.js:332:8)
                        pi@raspberrypi:~ $</anonymous></anonymous> 
                        

                        leider kein erfolg ….

                        was kann ich noch machen ?

                        1 Reply Last reply Reply Quote 0
                        • Homoran
                          Homoran Global Moderator Administrators last edited by

                          @SigiMOE:

                          was kann ich noch machen ? `
                          vorher in den Installationsordner wechseln:

                          cd /opt/iobroker
                          

                          und danach dann ein:

                          sudo iobroker backup
                          

                          du bist ja nur "pi"

                          Gruß

                          Rainer

                          1 Reply Last reply Reply Quote 0
                          • C
                            chemieka last edited by

                            Also ich konnte mit Putty auch ohne in den Ordner zu wechseln nur mit den einen Befehl.

                            Mit root eingeloggt.

                            Zusätzlich bin ich mit WinScp drauf gegangen und habe mir eine zip Datei vom Ordner opt gemacht.

                            Damit sollte ich auf der sicheren Seite sein.

                            1 Reply Last reply Reply Quote 0
                            • S
                              SigiMOE last edited by

                              @Homoran:

                              @SigiMOE:

                              was kann ich noch machen ? `
                              vorher in den Installationsordner wechseln:

                              cd /opt/iobroker
                              

                              und danach dann ein:

                              sudo iobroker backup
                              

                              du bist ja nur "pi"

                              Gruß

                              Rainer `

                              hat leider nicht geklappt 😞

                              root@raspberrypi:~# cd /opt/iobroker
                              root@raspberrypi:/opt/iobroker# sudo iobroker backup
                              /opt/iobroker/node_modules/tar.gz/node_modules/bluebird/js/main/generators.js:62
                                      var maybePromise = tryConvertToPromise(value, this._promise�;
                                                                                                 ^
                              SyntaxError: Invalid or unexpected token
                                  at Object.exports.runInThisContext (vm.js:76:16)
                                  at Module._compile (module.js:542:28)
                                  at Object.Module._extensions..js (module.js:579:10)
                                  at Module.load (module.js:487:32)
                                  at tryModuleLoad (module.js:446:12)
                                  at Function.Module._load (module.js:438:3)
                                  at Module.require (module.js:497:17)
                                  at require (internal/module.js:20:19)
                                  at module.exports (/opt/iobroker/node_modules/tar.gz/node_modules/bluebird/js/main/promise.js:721:1)
                                  at Object. <anonymous>(/opt/iobroker/node_modules/tar.gz/node_modules/bluebird/js/main/bluebird.js:9:39)
                                  at Module._compile (module.js:570:32)
                                  at Object.Module._extensions..js (module.js:579:10)
                                  at Module.load (module.js:487:32)
                                  at tryModuleLoad (module.js:446:12)
                                  at Function.Module._load (module.js:438:3)
                                  at Module.require (module.js:497:17)
                              root@raspberrypi:/opt/iobroker#</anonymous> 
                              

                              Noch eine Idee ?

                              als pi user geht es auch nicht…

                              pi@raspberrypi:~ $ cd /opt/iobroker
                              pi@raspberrypi:/opt/iobroker $ sudo iobroker backup
                              /opt/iobroker/node_modules/tar.gz/node_modules/bluebird/js/main/generators.js:62
                                      var maybePromise = tryConvertToPromise(value, this._promise�;
                                                                                                 ^
                              SyntaxError: Invalid or unexpected token
                                  at Object.exports.runInThisContext (vm.js:76:16)
                                  at Module._compile (module.js:542:28)
                                  at Object.Module._extensions..js (module.js:579:10)
                                  at Module.load (module.js:487:32)
                                  at tryModuleLoad (module.js:446:12)
                                  at Function.Module._load (module.js:438:3)
                                  at Module.require (module.js:497:17)
                                  at require (internal/module.js:20:19)
                                  at module.exports (/opt/iobroker/node_modules/tar.gz/node_modules/bluebird/js/main/promise.js:721:1)
                                  at Object. <anonymous>(/opt/iobroker/node_modules/tar.gz/node_modules/bluebird/js/main/bluebird.js:9:39)
                                  at Module._compile (module.js:570:32)
                                  at Object.Module._extensions..js (module.js:579:10)
                                  at Module.load (module.js:487:32)
                                  at tryModuleLoad (module.js:446:12)
                                  at Function.Module._load (module.js:438:3)
                                  at Module.require (module.js:497:17)
                              pi@raspberrypi:/opt/iobroker $</anonymous> 
                              
                              1 Reply Last reply Reply Quote 0
                              • C
                                chemieka last edited by

                                Ich glaube ich habe den Befehl ohne sudo eingegeben.

                                1 Reply Last reply Reply Quote 0
                                • S
                                  Sven2013 last edited by

                                  @mariohbs:

                                  Hi Leute,

                                  ich habe gerade nach der Anleitung aus den FAQ ein Backup vom IoBroker erstellt und per SFTP vom Raspi geholt. `

                                  Hallo Mario,

                                  ich habe das Backup bereits erstellt, hänge aber an dem oben genannten Punkt per SFTP vom raspi geholt.

                                  Kannst du mir vielleicht nochmal kurz beschreiben wie du die Daten von deinem Raspi auf beispielsweise die Synology bringst?

                                  Ich hatte mal eine funktionierende Lösung, bekomme diese aber leider nicht mehr zum laufen.

                                  Danke dafür Gruß Sven

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    mariohbs last edited by

                                    Hi Sven,

                                    also ich habe es nur auf meinem Windows PC geholt, dass ganz einfach mit FileZilla.

                                    Genau ist es hier beschrieben: https://jankarres.de/2015/01/raspberry- … filezilla/

                                    Viele Grüße

                                    Mario

                                    1 Reply Last reply Reply Quote 0
                                    • chucky666
                                      chucky666 last edited by

                                      @Solear:

                                      Hallo,

                                      ja das ist richtig so.

                                      Ich habe es eben durchprobiert mit einem Umzug von VM zu Raspi.

                                      Du erstellst ein Backup mit folgender Eingabe im Terminal:

                                      iobroker backup
                                      

                                      Jetzt ist im Verzeichnis /opt/iobroker/backups eine tar.gz Datei. Die sicherst du dir am besten weg. Da die so klein ist, kann man die auch an sich selbst per Mail ab und an senden. Nichts ist schlimmer als seine ganzen Skripte zu verlieren, also ruhig machen.

                                      Zur Wiederherstellung habe ich ein jungfräuliches iobroker auf dem Raspi nach der bekannten Anleitung erstellt:

                                      http://www.iobroker.net/docu/?page_id=5106&lang=de

                                      Dann die Backupdatei wieder einkopiert (der Backup-Ordner existiert noch nicht, ihn also da bei /opt/iobroker/backups anlegen).

                                      Jetzt im Terminal die Befehle eingeben (https://github.com/ioBroker/ioBroker/wi … ker-backup😞

                                      sudo iobroker stop

                                      sudo iobroker restore 0 [restore 0 sagt, nehme letzte Backup]

                                      iobroker start all [Adapter werden aktiviert]

                                      sudo iobroker start

                                      Jetzt eine Weile warten! Ganz wichtig! Man kann sich auf die admin-Webseite einloggen und sieht im Log dann, wie er nach und nach die Adapter automatisch installiert. Wenn sich alles beruhigt hat, die Adaptereinstellungen nochmal durchgehen. Ich musste nur beim Adapter hm-rpc die richtige CCU2-IP auswählen. Und in der Telegramm App das Passwort noch einmal neu bestätigen.

                                      Es sind alle Einstellungen, Adaptereinstellungen und Skripte fehlerfrei bei mir übernommen worden. Wie das mit VIS aussieht weiß ich nicht, ich nutze VIS nicht. `

                                      Wie kann man sich das Backup per Mail schicken?

                                      Gesendet von iPhone mit Tapatalk Pro

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        Solear last edited by

                                        @chucky666:

                                        Wie kann man sich das Backup per Mail schicken? `

                                        Vom Raspi aus per Terminal?

                                        Erstmal Mailfunktionen installieren:

                                        sudo apt-get install ssmtp
                                        sudo apt-get install mailutils
                                        sudo apt-get install mpack
                                        
                                        

                                        Danach die Mailkonfiguration (Beispiel Gmail) anpassen:

                                        sudo nano /etc/ssmtp/ssmtp.conf
                                        
                                        root=meine@gmail.com
                                        mailhub=smtp.gmail.com:587
                                        hostname=raspberrypi
                                        rewriteDomain=gmail.com
                                        AuthUser=meine@gmail.com
                                        AuthPass=GmailPasswort
                                        FromLineOverride=YES
                                        UseSTARTTLS=YES
                                        
                                        

                                        Jetzt kann man die Datei mailen:

                                        mpack -s "iobroker Backup" /opt/iobroker/backups/xxxDateinamexxx.tar.gz empfänger@domain.com
                                        
                                        

                                        Nicht getestet, sollte aber funzen.

                                        Das wäre eigentlich ein toller Cronjob für den Raspi. Jede Nacht oder wöchentlich iobroker beenden, backup erzeugen, iobroker starten, mail senden.

                                        1 Reply Last reply Reply Quote 0
                                        • chucky666
                                          chucky666 last edited by

                                          Danke teste es nachher

                                          Gesendet von iPhone mit Tapatalk Pro

                                          1 Reply Last reply Reply Quote 0
                                          • S
                                            Solear last edited by

                                            Es klappt. Habs gerade mit einer all-inkl. Mailadresse ausprobiert :mrgreen:

                                            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

                                            791
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            16
                                            59
                                            34346
                                            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