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.
    • 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
                                  • S
                                    Sven2013 last edited by

                                    Hallo,

                                    ich erstelle momentan immer das Backup per Hand und sichere es dann per Hand auf meiner synology.

                                    Diesen Vorgenag hatte ich schonmal automatisiert. Leider habe ich nach einem Systemausfall den Raspi gegen ein Cubieboard getauscht.

                                    Nunhabe ich leider keine Ahnung mehr wie ich das damals (mit der Hilfe von Brati) geschafft habe.

                                    Ich hatte vorher folgenden Ablauf:

                                    io broker stop

                                    backup iobroker

                                    daraus entstand die Datei: /opt/iobroker/backups/2017_03_10-09_27_20_backupiobroker.tar.gz

                                    Nun weiß ich nicht mehr genau, ob die Synology die Datei auf dem cubie abgeholt hat oder ob der cubie die Dtei automatisch an die Synology geschickt hat.

                                    Es wurden dann 7 Sicherungen gespeichert und dann überschrieben.

                                    Kann mir da nochmal jemand weiterhelfen um das wieder eingerichtet zu bekommen?

                                    Gruß Sven

                                    1 Reply Last reply Reply Quote 0
                                    • K
                                      klassisch Most Active last edited by

                                      Auf meinem Raspi habe ich jetzt einen Effekt wie obe schon mal beschrieben:

                                      root@Raspi-2-1-iobroker:/opt/iobroker# sudo iobroker backup
                                      /opt/iobroker/node_modules/iobroker.js-controller/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/graceful-fs/polyfills.js:216
                                            } filally {
                                            ^
                                      
                                      SyntaxError: Missing catch or finally after try
                                          at exports.runInThisContext (vm.js:53:16)
                                          at Module._compile (module.js:373:25)
                                          at Object.Module._extensions..js (module.js:416:10)
                                          at Module.load (module.js:343:32)
                                          at Function.Module._load (module.js:300:12)
                                          at Module.require (module.js:353:17)
                                          at require (internal/module.js:12:17)
                                          at Object. <anonymous>(/opt/iobroker/node_modules/iobroker.js-controller/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/graceful-fs/graceful-fs.js:2:17)
                                          at Module._compile (module.js:409:26)
                                          at Object.Module._extensions..js (module.js:416:10)
                                      root@Raspi-2-1-iobroker:/opt/iobroker#</anonymous> 
                                      

                                      Habe in der Vergangenheit schon etliche backups gemacht, aber so etwas hatte ich noch nie. Was kann ich tun? Ich will vom Raspi auf einen OrangePi umziehen.

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

                                        Hallo

                                        Kann man das Backup auch per Telegram verschicken ?

                                        Gesendet von iPad mit Tapatalk Pro

                                        1 Reply Last reply Reply Quote 0
                                        • kmxak
                                          kmxak Most Active last edited by

                                          du könntest über ein Button sowas auslösen

                                          on({id: 'taster hier hin', val: true}, function() {
                                          sendTo('telegram', '/opt/iobroker/backups/*.tar.gz');
                                          log("Backup verschickt");
                                          });
                                          

                                          Ungetestet den trigger kann man bestimmt noch ändern. Und das send to anpassen das er immer die letzte datei nimmt oder vor dem backup halt den ordner säubern.

                                          ob *.tar.gz geht oder ob da der genaue dateiname stehen muss weiß ich auch nicht+

                                          das script an sich funktioniert aber mit dem datein senden.

                                          Auch weiß ich nicht wieviel mb verschickt werden können.

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

                                            Klappt leider nicht

                                            Gesendet von iPad mit Tapatalk Pro

                                            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

                                            907
                                            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