Skip to content
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Logo
  1. ioBroker Community Home
  2. Deutsch
  3. ioBroker Allgemein
  4. [gelöst] Backup und Restore

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.0k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    1.8k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.0k

[gelöst] Backup und Restore

Scheduled Pinned Locked Moved ioBroker Allgemein
59 Posts 16 Posters 35.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chemieka
    wrote on last edited by
    #5

    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
    0
    • HomoranH Do not disturb
      HomoranH Do not disturb
      Homoran
      Global Moderator Administrators
      wrote on last edited by
      #6

      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

      kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

      Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

      der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chemieka
        wrote on last edited by
        #7

        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
        0
        • S Offline
          S Offline
          SigiMOE
          wrote on last edited by
          #8

          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
          0
          • M Offline
            M Offline
            mariohbs
            wrote on last edited by
            #9

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

            Sollte man das?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SigiMOE
              wrote on last edited by
              #10

              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
              0
              • HomoranH Do not disturb
                HomoranH Do not disturb
                Homoran
                Global Moderator Administrators
                wrote on last edited by
                #11

                @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

                kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  chemieka
                  wrote on last edited by
                  #12

                  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
                  0
                  • S Offline
                    S Offline
                    SigiMOE
                    wrote on last edited by
                    #13

                    @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
                    0
                    • C Offline
                      C Offline
                      chemieka
                      wrote on last edited by
                      #14

                      Ich glaube ich habe den Befehl ohne sudo eingegeben.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Sven2013
                        wrote on last edited by
                        #15

                        @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
                        0
                        • M Offline
                          M Offline
                          mariohbs
                          wrote on last edited by
                          #16

                          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
                          0
                          • chucky666C Online
                            chucky666C Online
                            chucky666
                            wrote on last edited by
                            #17

                            @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
                            0
                            • S Offline
                              S Offline
                              Solear
                              wrote on last edited by
                              #18

                              @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.

                              iobroker als LXC unter Proxmox

                              1 Reply Last reply
                              0
                              • chucky666C Online
                                chucky666C Online
                                chucky666
                                wrote on last edited by
                                #19

                                Danke teste es nachher

                                Gesendet von iPhone mit Tapatalk Pro

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  Solear
                                  wrote on last edited by
                                  #20

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

                                  iobroker als LXC unter Proxmox

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    Sven2013
                                    wrote on last edited by
                                    #21

                                    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
                                    0
                                    • K Offline
                                      K Offline
                                      klassisch
                                      Most Active
                                      wrote on last edited by
                                      #22

                                      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
                                      0
                                      • chucky666C Online
                                        chucky666C Online
                                        chucky666
                                        wrote on last edited by
                                        #23

                                        Hallo

                                        Kann man das Backup auch per Telegram verschicken ?

                                        Gesendet von iPad mit Tapatalk Pro

                                        1 Reply Last reply
                                        0
                                        • kmxakK Offline
                                          kmxakK Offline
                                          kmxak
                                          Most Active
                                          wrote on last edited by
                                          #24

                                          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.

                                          Gruß Alex

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

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

                                          630

                                          Online

                                          32.4k

                                          Users

                                          81.3k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe