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.1k

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

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

[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.
  • 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
                          • chucky666C Online
                            chucky666C Online
                            chucky666
                            wrote on last edited by
                            #25

                            Klappt leider nicht

                            Gesendet von iPad mit Tapatalk Pro

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

                              was genau klappt nicht?

                              kann telegram überhaupt ein archiv verschicken?

                              Gruß Alex

                              1 Reply Last reply
                              0
                              • Espace0401E Offline
                                Espace0401E Offline
                                Espace0401
                                wrote on last edited by
                                #27

                                Lassen sich eigentlich auch von einzelnen Adapter backups erstellen und wiederherstellen? Die Frage bezieht sich in erster Linie auf yahka, weil man dort immer eine Menge Arbeit reinstecken muss, falls man von Hand alles neu einrichten muss.

                                Iobroker in LXC-Container auf Proxmox 8 - Sicherung auf PBS - Homematic CCU2 - Netatmo Wetterstation und Thermostat

                                1 Reply Last reply
                                0
                                • Mr. BurnsM Offline
                                  Mr. BurnsM Offline
                                  Mr. Burns
                                  wrote on last edited by
                                  #28

                                  Hi,

                                  ich möchte gerne ein Backup in ein neues System einspielen.

                                  Ich hatte einen Raspberry Pi 2 B und jetzt einen Raspberry Pi 3B+. Die alte installation ist noch vorhanden läuft aber nicht mehr rund.

                                  Ich habe ein Backup erstellt und wollte dies gerne einspielen:

                                  sudo ioBroker stop

                                  sudo mkdir /opt/iobroker/backup/

                                  per Cyberduck, die Backup-Datei in den o.g. Ordner übertragen

                                  cd /opt/iobroker/backup/

                                  iobroker restore 0 (alternativ auch mit dem Dateinamen probiert)

                                  ich erhielt folgendes zurück:

                                  host.ioBroker Cannot find /opt/iobroker/node_modules/iobroker.js-controller/lib/setup/../../../../backups/2018_07_09-11_46_19_backupiobroker.tar.gz

                                  Das update wurde nicht eingespielt, ich habe zumindest keine Werte, Adapter oder VIS Bilder in der neuen Installation.

                                  Weiß einer von euch was ich evtl. falsch mache?

                                  Gruß

                                  Thomas

                                  1 Reply Last reply
                                  0
                                  • HomoranH Do not disturb
                                    HomoranH Do not disturb
                                    Homoran
                                    Global Moderator Administrators
                                    wrote on last edited by
                                    #29

                                    @Mr. Burns:

                                    Weiß einer von euch was ich evtl. falsch mache? `
                                    Yepp!

                                    @Mr. Burns:

                                    sudo mkdir /opt/iobroker/backup/ `

                                    ~~@[url=http://www.iobroker.net/docu/?page_id=2380⟨=de:~~

                                    ~~Doku"]~~man ruft in der Konsole unter /opt/iobroker den Befehl auf: ./iobroker backup

                                    Daraufhin erstellt iobroker in dem Verzeichnis /opt/iobroker/backups eine gepackte Datei mit Datum im Dateinamen, z.B.: 2015_04_17-22_30_47_backupIoBroker.tar.gz `

                                    Dir fehlt zumindest ein S

                                    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
                                    • Mr. BurnsM Offline
                                      Mr. BurnsM Offline
                                      Mr. Burns
                                      wrote on last edited by
                                      #30

                                      Oh Mann. So ein blöder Fehler. Wer lesen kann…

                                      Tausend Dank. Er installiert....

                                      1 Reply Last reply
                                      0
                                      • Mr. BurnsM Offline
                                        Mr. BurnsM Offline
                                        Mr. Burns
                                        wrote on last edited by
                                        #31

                                        Soweit hat alles geklappt mit dem Restore, bis auf 2 Adapter:

                                        Harmony und Amazon Dash Button

                                        Ich habe bereits den Harmony Adapter deinstalliert und versucht diesen neu zu installieren. als Fehlermeldung bekomme ich folgendes zurück:

                                        ! ERR! code ENOGIT
                                        ! npm ERR! not found: gitnpm ERR!
                                        ! npm ERR! Failed using git.
                                        ! npm ERR! This is most likely not a problem with npm itself.
                                        ! npm ERR! Please check if you have git installed and in your PATH.
                                        ! npm ERR! A complete log of this run can be found in:
                                        ! npm ERR! /root/.npm/_logs/2018-07-17T10_55_48_953Z-debug.log
                                        ! host.ioBroker create instance harmony
                                        ! ERROR: host.ioBroker error: reading io-package.json Error: ENOENT: no such file or directory, open 'null/io-package.json'
                                        ! ERROR: process exited with code 20

                                        Wenn ich versuche Amazon Dash Button neu zu installieren bekomme ich diese Fehlermeldung:

                                        ! $ ./iobroker add amazon-dash
                                        ! NPM version: 4.6.1
                                        ! npm install iobroker.amazon-dash –production --save --prefix "/opt/iobroker" (System call)
                                        ! npm WARN addRemoteGit Error: not found: gitnpm
                                        ! WARN addRemoteGit at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)npm WARN addRemoteGit at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
                                        ! npm WARN addRemoteGit at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
                                        ! npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
                                        ! npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
                                        ! npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
                                        ! npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:284:29
                                        ! npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:152:21)
                                        ! npm WARN addRemoteGit git+https://github.com/bytzdev/node-socketwatcher.git resetting remote /root/.npm/_git-remotes/git-https-github-com-bytzdev-node-socketwatcher-git-e2de02de because of error: { Error: not found: git
                                        ! npm WARN addRemoteGit at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
                                        ! npm WARN addRemoteGit at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
                                        ! npm WARN addRemoteGit at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
                                        ! npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
                                        ! npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
                                        ! npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
                                        ! npm WARN addRemoteGit at /usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:284:29
                                        ! npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOGIT' }
                                        ! npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror https://github.com/bytzdev/node-socketwatcher.git /root/.npm/_git-remotes/git-https-github-com-bytzdev-node-socketwatcher-git-e2de02de: undefinednpm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror https://github.com/bytzdev/node-socketwatcher.git /root/.npm/_git-remotes/git-https-github-com-bytzdev-node-socketwatcher-git-e2de02de: undefined
                                        ! npm ERR! code ENOGIT
                                        ! npm
                                        ! ERR! not found: gitnpm ERR!
                                        ! npm ERR! Failed using git.
                                        ! npm
                                        ! ERR! This is most likely not a problem with npm itself.npm ERR! Please check if you have git installed and in your PATH.
                                        ! npm ERR! A complete log of this run can be found in:npm ERR! /root/.npm/_logs/2018-07-17T11_04_43_822Z-debug.log
                                        ! host.ioBroker create instance amazon-dash
                                        ! ERROR: host.ioBroker error: reading io-package.json Error: ENOENT: no such file or directory, open 'null/io-package.json'
                                        ! ERROR: process exited with code 20

                                        Soweit sollte alles aktuell sein.

                                        Hardware Raspberry Pi 3B+

                                        Sandisk 8GB

                                        node 8.11.3

                                        nodejs 8.11.3

                                        npm 4.6.1

                                        js-controller 1.4.2

                                        Es wäre toll, wenn jemand wüste woran das liegen kann. (Ich nutze beide Adapter zur Zeit nicht aktiv…würde den Harmony aber demnächst gerne einsetzen)

                                        Gruß

                                        Thomas

                                        1 Reply Last reply
                                        0
                                        • DutchmanD Offline
                                          DutchmanD Offline
                                          Dutchman
                                          Developer Most Active Administrators
                                          wrote on last edited by
                                          #32

                                          Error = failed using git, du must also git installieren.

                                          sudo apt-get Install git
                                          

                                          Sent from my iPhone using Tapatalk

                                          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

                                          250

                                          Online

                                          32.4k

                                          Users

                                          81.4k

                                          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