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.
    • 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
                    • kmxak
                      kmxak Most Active last edited by

                      was genau klappt nicht?

                      kann telegram überhaupt ein archiv verschicken?

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

                        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.

                        1 Reply Last reply Reply Quote 0
                        • Mr. Burns
                          Mr. Burns last edited by

                          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 Reply Quote 0
                          • Homoran
                            Homoran Global Moderator Administrators last edited by

                            @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

                            1 Reply Last reply Reply Quote 0
                            • Mr. Burns
                              Mr. Burns last edited by

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

                              Tausend Dank. Er installiert....

                              1 Reply Last reply Reply Quote 0
                              • Mr. Burns
                                Mr. Burns last edited by

                                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 Reply Quote 0
                                • Dutchman
                                  Dutchman Developer Most Active Administrators last edited by

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

                                  sudo apt-get Install git
                                  

                                  Sent from my iPhone using Tapatalk

                                  1 Reply Last reply Reply Quote 0
                                  • Mr. Burns
                                    Mr. Burns last edited by

                                    Das hat bei Harmony funktioniert. Danke dafür. Ich hab "git" nicht als Programm identifiziert. Kann mich auch nicht erinnern, das ich das vorher mal installiert habe…ich werd wohl alt.

                                    Bei Amazon Dash Button funktioniert es leider nicht. Bei dem Versuch es neu zu installieren bekomme ich folgendes LOG:

                                    ! $ ./iobroker add amazon-dash
                                    ! NPM version: 4.6.1
                                    ! npm install iobroker.amazon-dash –production --save --prefix "/opt/iobroker" (System call)
                                    ! npm
                                    ! WARN
                                    ! lifecycle
                                    ! iobroker.amazon-dash@0.2.9~preinstall: cannot run in wd %s %s (wd=%s) iobroker.amazon-dash@0.2.9 apt-get install libpcap-dev -y || true /opt/iobroker/node_modules/.staging/iobroker.amazon-dash-eb5038e9
                                    ! ../socket_watcher.cpp: In static member function ‘static void SocketWatcher::Callback(uv_poll_t*, int, int)’:../socket_watcher.cpp:77:60: warning: ‘v8::Local v8::valueNan::MakeCallback(v8::Localv8::object, v8::Localv8::function, int, v8::Localv8::value*)’ is deprecated [-Wdeprecated-declarations]
                                    ! Nan::MakeCallback(watcher->handle(), callback, argc, argv);
                                    ! ^
                                    ! In file included from ../socket_watcher.hpp:8:0,
                                    ! from ../socket_watcher.cpp:5:
                                    ! ../../nan/nan.h:929:46: note: declared here
                                    ! NAN_DEPRECATED inline v8::Local v8::valueMakeCallback(
                                    ! ^~~~~~~~~~~~
                                    ! ../pcap_binding.cc:2:23: fatal error: pcap/pcap.h: Datei oder Verzeichnis nicht gefunden #include <pcap pcap.h="">^
                                    ! compilation terminated.
                                    ! make: *** [Release/obj.target/pcap_binding/pcap_binding.o] Fehler 1
                                    ! gyp
                                    ! ERR!
                                    ! build error gyp ERR! stack Error: make failed with exit code: 2
                                    ! gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:285:23)
                                    ! gyp ERR! stack at emitTwo (events.js:126:13)
                                    ! gyp ERR! stack at ChildProcess.emit (events.js:214:7)
                                    ! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
                                    ! gyp ERR! System Linux 4.14.52-v7+
                                    ! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
                                    ! gyp ERR! cwd /opt/iobroker/node_modules/pcapgyp ERR! node -v v8.11.3
                                    ! gyp ERR! node-gyp -v v3.6.0
                                    ! gyp ERR! not ok
                                    ! npm
                                    ! ERR! code
                                    ! ELIFECYCLE
                                    ! npm
                                    ! ERR! errno 1
                                    ! npm ERR! pcap@2.0.0 install: node-gyp rebuildnpm ERR! Exit status 1
                                    ! npm ERR!
                                    ! npm ERR! Failed at the pcap@2.0.0 install script.
                                    ! npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
                                    ! npm ERR! A complete log of this run can be found in:npm ERR! /root/.npm/_logs/2018-07-17T13_24_57_717Z-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</pcap></v8::value></v8::value></v8::function></v8::object></v8::value>

                                    1 Reply Last reply Reply Quote 0
                                    • Dutchman
                                      Dutchman Developer Most Active Administrators last edited by

                                      Mit dem Amazon dashbutton gab's gerade auf Facebook genau dasselbe Problem:

                                      sudo su
                                      cd /opt/iobroker
                                      iobroker add amazon-dash
                                      

                                      Sent from my iPhone using Tapatalk

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

                                        —-

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

                                          @Mr. Burns:

                                          Kann mich auch nicht erinnern, das ich das vorher mal installiert habe `
                                          Wenn du ein Image verwendet hattest ist es da wohlweislich bereits installiert.

                                          Gruß

                                          Rainer

                                          1 Reply Last reply Reply Quote 0
                                          • Mr. Burns
                                            Mr. Burns last edited by

                                            Du hast recht, beim letztem Biobroker hab ich ein image verwendet…

                                            Hab versucht den Adapter über das Terminal zu installieren:

                                            ! root@ioBroker:/opt/iobroker# iobroker stop
                                            ! Stopping iobroker controller daemon…
                                            ! iobroker controller daemon stopped.
                                            ! Exit code for "killall.sh": 123
                                            ! root@ioBroker:/opt/iobroker# iobroker add amazon-dash
                                            ! NPM version: 4.6.1
                                            ! npm install iobroker.amazon-dash --production --save --prefix "/opt/iobroker" (System call)
                                            ! npm WARN lifecycle iobroker.amazon-dash@0.2.9~preinstall: cannot run in wd %s %s (wd=%s) iobroker.amazon-dash@0.2.9 apt-get install libpcap-dev -y || true /opt/iobroker/node_modules/.staging/iobroker.amazon-dash-eb5038e9
                                            ! ../socket_watcher.cpp: In static member function 'static void SocketWatcher::Callback(uv_poll_t*, int, int)':
                                            ! ../socket_watcher.cpp:77:60: warning: 'v8::Local v8::valueNan::MakeCallback(v8::Localv8::object, v8::Localv8::function, int, v8::Localv8::value*)' is deprecated [-Wdeprecated-declarations]
                                            ! Nan::MakeCallback(watcher->handle(), callback, argc, argv);
                                            ! ^
                                            ! In file included from ../socket_watcher.hpp:8:0,
                                            ! from ../socket_watcher.cpp:5:
                                            ! ../../nan/nan.h:929:46: note: declared here
                                            ! NAN_DEPRECATED inline v8::Local v8::valueMakeCallback(
                                            ! ^~~~~~~~~~~~
                                            ! ../pcap_binding.cc:2:23: fatal error: pcap/pcap.h: No such file or directory
                                            ! #include <pcap pcap.h="">^
                                            ! compilation terminated.
                                            ! make: *** [Release/obj.target/pcap_binding/pcap_binding.o] Error 1
                                            ! gyp ERR! build error
                                            ! gyp ERR! stack Error: make failed with exit code: 2
                                            ! gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:285:23)
                                            ! gyp ERR! stack at emitTwo (events.js:126:13)
                                            ! gyp ERR! stack at ChildProcess.emit (events.js:214:7)
                                            ! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
                                            ! gyp ERR! System Linux 4.14.52-v7+
                                            ! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
                                            ! gyp ERR! cwd /opt/iobroker/node_modules/pcap
                                            ! gyp ERR! node -v v8.11.3
                                            ! gyp ERR! node-gyp -v v3.6.0
                                            ! gyp ERR! not ok
                                            ! npm ERR! code ELIFECYCLE
                                            ! npm ERR! errno 1
                                            ! npm ERR! pcap@2.0.0 install: node-gyp rebuild
                                            ! npm ERR! Exit status 1
                                            ! npm ERR!
                                            ! npm ERR! Failed at the pcap@2.0.0 install script.
                                            ! npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
                                            ! npm ERR! A complete log of this run can be found in:
                                            ! npm ERR! /root/.npm/_logs/2018-07-17T16_04_57_948Z-debug.log
                                            ! host.ioBroker create instance amazon-dash
                                            ! host.ioBroker error: reading io-package.json Error: ENOENT: no such file or directory, open 'null/io-package.json'</pcap></v8::value></v8::value></v8::function></v8::object></v8::value>

                                            War leider nicht so erfolgreich. Aber ich hab sowieso keinen so richtigen Einsatzort für diesen Schalter gefunden. Wollte nur sehen ob das wirklich funktioniert…

                                            Danke für eure Unterstützung!

                                            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

                                            923
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

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