Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Error/Bug
    4. [gelöst] Backitup kann influxdb Datenbank nicht sichern.

    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] Backitup kann influxdb Datenbank nicht sichern.

    This topic has been deleted. Only users with topic management privileges can see it.
    • Thomas Braun
      Thomas Braun Most Active @Christian Kohlöffel last edited by Thomas Braun

      @christian-kohlöffel

      Wohin soll das Backup denn geschrieben werden? In ein eingehängtes Dateisystem (per SMB/CIFS oder z. B. NFS)?

      Wobei ich eher vermute, dass der User iobroker noch in eine influxDB-Gruppe reingehört.

      Christian Kohlöffel 2 Replies Last reply Reply Quote 0
      • Christian Kohlöffel
        Christian Kohlöffel @Thomas Braun last edited by

        @thomas-braun
        Das Backup soll wie bisher auch schon auf meine Fritzbox geschrieben werden. Der mount funktioniert auch.

        [DEBUG] [mount] start with {"mountType":"CIFS","type":"storage","source":null,"mount":"//192.168.178.1","debugging":true,"fileDir":"/opt/iobroker/node_modules/iobroker.backitup","wakeOnLAN":false,"macAd":"20:DE:20:DE:20:DE","wolTime":"25","smb":"vers=1.0","sudo":true,"cifsDomain":"","deleteOldBackup":true,"ownDir":false,"bkpType":"Minimal","dir":"fritz.nas/KINGSTON/iOBroker_Backups","dirMinimal":"sharename/backupDir","user":"Christian","pass":"****"}
        [DEBUG] [mount] - mount successfully completed
        
        Thomas Braun 1 Reply Last reply Reply Quote 0
        • Thomas Braun
          Thomas Braun Most Active @Christian Kohlöffel last edited by

          @christian-kohlöffel

          In welchen Gruppen ist der pi drin?

          sudo -u pi groups
          

          Ich vermute da gibt es eine zu influx. In die muss der iobroker dann auch gepackt werden.

          Christian Kohlöffel 1 Reply Last reply Reply Quote 0
          • Christian Kohlöffel
            Christian Kohlöffel @Thomas Braun last edited by

            @thomas-braun said in Backitup kann influxdb Datenbank nicht sichern.:

            Wobei ich eher vermute, dass der User iobroker noch in eine influxDB-Gruppe reingehört.

            Bisher habe ich wie im Howto beschrieben nur die User "user" und "admin" drin. Wie zb. hierz u sehen.
            https://www.verdrahtet.info/2020/02/14/installation-von-influxdb-grafana-inkl-verbindung-zu-iobroker/

            1 Reply Last reply Reply Quote 0
            • Christian Kohlöffel
              Christian Kohlöffel @Thomas Braun last edited by

              @thomas-braun said in Backitup kann influxdb Datenbank nicht sichern.:

              sudo -u pi groups

              pi@raspberrypi:~ $ sudo -u pi groups
              pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi iobroker
              
              simatec 1 Reply Last reply Reply Quote 0
              • simatec
                simatec Developer Most Active @Christian Kohlöffel last edited by

                @christian-kohlöffel
                Versuche das Backup erstmal lokal zu erstellen.
                Sieht mir nach einem Rechteproblem auf deinem NAS aus.

                Christian Kohlöffel 1 Reply Last reply Reply Quote 0
                • Christian Kohlöffel
                  Christian Kohlöffel @simatec last edited by

                  @simatec

                  Anzeige im iobroker Admin:

                  [DEBUG] [iobroker] - done
                  [DEBUG] [influxDB] - Start InfluxDB Backup ...
                  [DEBUG] [influxDB] - InfluxDB Backup tmp directory created 
                  [DEBUG] [influxDB] - Try deleting the InfluxDB tmp directory
                  [DEBUG] [influxDB] - InfluxDB tmp directory was successfully deleted
                  [ERROR] [influxDB] - [IGNORED] Error: Command failed: influxd backup -portable -database iobroker "/opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker"
                  backup: copy: read /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/meta.00: input/output error
                  

                  Anzeige im Putty, wenn ich es lokal ausführe:

                  
                  pi@raspberrypi:~ $ influxd backup -portable -database iobroker "/opt/iobroker/ba                                                                                                                                                             ckups/influxDB_2021_04_06-20_42_54_backupiobroker"
                  2021/04/06 20:44:24 backing up metastore to /opt/iobroker/backups/influxDB_2021_                                                                                                                                                             04_06-20_42_54_backupiobroker/meta.00
                  2021/04/06 20:44:24 backing up db=iobroker
                  2021/04/06 20:44:24 backing up db=iobroker rp=autogen shard=2 to /opt/iobroker/b                                                                                                                                                             ackups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00002.00 sin                                                                                                                                                             ce 0001-01-01T00:00:00Z
                  2021/04/06 20:44:24 backing up db=iobroker rp=autogen shard=6 to /opt/iobroker/b                                                                                                                                                             ackups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00006.00 sin                                                                                                                                                             ce 0001-01-01T00:00:00Z
                  2021/04/06 20:44:25 backing up db=iobroker rp=autogen shard=14 to /opt/iobroker/                                                                                                                                                             backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00014.00 si                                                                                                                                                             nce 0001-01-01T00:00:00Z
                  2021/04/06 20:44:25 backing up db=iobroker rp=autogen shard=22 to /opt/iobroker/                                                                                                                                                             backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00022.00 si                                                                                                                                                             nce 0001-01-01T00:00:00Z
                  2021/04/06 20:44:26 backing up db=iobroker rp=autogen shard=30 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00030.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:44:27 backing up db=iobroker rp=autogen shard=38 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00038.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:44:29 backing up db=iobroker rp=autogen shard=46 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00046.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:44:31 backing up db=iobroker rp=autogen shard=54 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00054.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:44:38 backing up db=iobroker rp=autogen shard=62 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00062.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:44:40 backing up db=iobroker rp=autogen shard=70 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00070.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:44:41 backing up db=iobroker rp=autogen shard=78 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00078.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:44:47 backing up db=iobroker rp=autogen shard=86 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00086.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:44:52 backing up db=iobroker rp=autogen shard=94 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00094.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:44:53 backing up db=iobroker rp=autogen shard=102 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00102.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:44:56 backing up db=iobroker rp=autogen shard=110 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00110.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:44:57 backing up db=iobroker rp=autogen shard=118 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00118.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:44:59 backing up db=iobroker rp=autogen shard=126 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00126.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:45:01 backing up db=iobroker rp=autogen shard=134 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00134.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:45:04 backing up db=iobroker rp=autogen shard=142 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00142.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:45:07 backing up db=iobroker rp=autogen shard=150 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00150.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:45:10 backing up db=iobroker rp=autogen shard=158 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00158.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:45:19 backing up db=iobroker rp=autogen shard=166 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00166.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:45:23 backing up db=iobroker rp=autogen shard=174 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00174.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:45:26 backing up db=iobroker rp=autogen shard=182 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00182.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:45:28 backing up db=iobroker rp=autogen shard=190 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00190.00 since 0001-01-01T00:00:00Z
                  2021/04/06 20:45:34 backing up db=iobroker rp=autogen shard=198 to /opt/iobroker/backups/influxDB_2021_04_06-20_42_54_backupiobroker/iobroker.autogen.00198.00 since 0001-01-01T00:00:00Z
                  

                  So wie ich es interpretiere wird das Backup auch erst mal lokal gemacht und erst dann auf des NAS rüber kopiert. Aber das Problem scheint zu sein, dass wohl irgendwelche Rechte o.ä. fehlen. Mit Putty und "pi" als user scheint es ja zu gehen. Aber ich kann da durchaus aus total auf dem Holzweg sein, keine Ahnung ....

                  simatec 1 Reply Last reply Reply Quote 0
                  • simatec
                    simatec Developer Most Active @Christian Kohlöffel last edited by

                    @christian-kohlöffel
                    OK dann mache mal bitte folgendes. Suche mal den Dateipfad von influxd und trage diesen in die Einstellungen von Backitup inkl. Dateinamen ein

                    which influxd
                    

                    Den kompletten Pfad als Beispiel „/usr/bin/influxd“ dann eintragen und erneut versuchen.

                    Christian Kohlöffel 1 Reply Last reply Reply Quote 0
                    • Christian Kohlöffel
                      Christian Kohlöffel @simatec last edited by Christian Kohlöffel

                      @simatec said in Backitup kann influxdb Datenbank nicht sichern.:

                      which influxd

                      OK der Pfad lautet:

                      /usr/bin/influxd
                      

                      Nach Änderung im Adapter folgendes Ergebnis:

                      [ERROR] [influxDB] - [IGNORED] Error: Command failed: "/usr/bin/influxd" backup -portable -database iobroker "/opt/iobroker/backups/influxDB_2021_04_06-21_08_18_backupiobroker"
                      backup: copy: read /opt/iobroker/backups/influxDB_2021_04_06-21_08_18_backupiobroker/meta.00: input/output error
                      
                      
                      simatec Christian Kohlöffel 2 Replies Last reply Reply Quote 0
                      • simatec
                        simatec Developer Most Active @Christian Kohlöffel last edited by

                        @christian-kohlöffel
                        Was hat der Ordner /opt/iobroker/backups für Rechte?

                        1 Reply Last reply Reply Quote 0
                        • Christian Kohlöffel
                          Christian Kohlöffel @Christian Kohlöffel last edited by

                          @christian-kohlöffel

                          der Befehl

                          ls -l
                          

                          gibt folgende INFO zum Ordner:

                          pi@raspberrypi:/opt/iobroker/backups $ ls -l /opt/iobroker/
                          total 288
                          drwxrwxr-x+    4 iobroker iobroker   4096 Apr  6 20:44 backups
                          
                          simatec 1 Reply Last reply Reply Quote 0
                          • simatec
                            simatec Developer Most Active @Christian Kohlöffel last edited by

                            @christian-kohlöffel
                            Führe mal folgendes aus und versuche es im Anschluss nochmal mit dem Backup.

                            sudo chmod 755 /opt/iobroker/backups
                            sudo chmod 755 /opt/iobroker/backups/
                            sudo chmod 755 /opt/iobroker/backups/*
                            
                            Christian Kohlöffel 1 Reply Last reply Reply Quote 0
                            • Christian Kohlöffel
                              Christian Kohlöffel @simatec last edited by

                              @simatec

                              Leider keine Veränderung:

                              [ERROR] [influxDB] - [IGNORED] Error: Command failed: "/usr/bin/influxd" backup -portable -database iobroker "/opt/iobroker/backups/influxDB_2021_04_06-21_39_12_backupiobroker"
                              backup: copy: read /opt/iobroker/backups/influxDB_2021_04_06-21_39_12_backupiobroker/meta.00: input/output error
                              

                              Hier auch noch wieder mit Standard Pfad zur Datei influxd

                              [ERROR] [influxDB] - [IGNORED] Error: Command failed: influxd backup -portable -database iobroker "/opt/iobroker/backups/influxDB_2021_04_06-21_40_49_backupiobroker"
                              backup: copy: read /opt/iobroker/backups/influxDB_2021_04_06-21_40_49_backupiobroker/meta.00: input/output error
                              
                              
                              simatec Christian Kohlöffel 3 Replies Last reply Reply Quote 0
                              • simatec
                                simatec Developer Most Active @Christian Kohlöffel last edited by

                                @christian-kohlöffel
                                Es scheint, als ob der User iobroker keine Rechte für Influx besitzt.
                                Wie hast du influx installiert?

                                1 Reply Last reply Reply Quote 0
                                • Christian Kohlöffel
                                  Christian Kohlöffel @Christian Kohlöffel last edited by Christian Kohlöffel

                                  @christian-kohlöffel

                                  Ich bin mir nicht mehr zu 100% sicher, aber ich glaube nach folgender Anleitung:

                                  https://www.verdrahtet.info/2020/02/14/installation-von-influxdb-grafana-inkl-verbindung-zu-iobroker/

                                  Was heißt es gibt den User iobroker nicht, sondern den User "user". Das ist auch der Login beim Adapter inlfluxdb.

                                  Hier die User laut influx:

                                  pi@raspberrypi:/opt/iobroker/backups $ influx
                                  Connected to http://localhost:8086 version 1.8.4
                                  InfluxDB shell version: 1.8.4
                                  > auth
                                  username: admin
                                  password:
                                  > SHOW USERS
                                  user  admin
                                  ----  -----
                                  admin true
                                  user  false
                                  >
                                  

                                  Aber vielleicht meintest du gar nicht die influx user ...

                                  1 Reply Last reply Reply Quote 0
                                  • Christian Kohlöffel
                                    Christian Kohlöffel @Christian Kohlöffel last edited by

                                    @simatec

                                    Hier die Rechte für die Dateien:

                                    pi@raspberrypi:/usr/bin $ ls infl* -l
                                    -rwxr-xr-x 1 root root 47338750 Jan 28 12:10 influx
                                    -rwxr-xr-x 1 root root 58179503 Jan 28 12:10 influxd
                                    -rwxr-xr-x 1 root root 17902141 Jan 28 12:10 influx_inspect
                                    -rwxr-xr-x 1 root root 10911515 Jan 28 12:10 influx_stress
                                    -rwxr-xr-x 1 root root 19100763 Jan 28 12:10 influx_tsm
                                    pi@raspberrypi:/usr/bin $
                                    
                                    

                                    Scheint aber auch alles zu passen, oder?

                                    simatec 1 Reply Last reply Reply Quote 0
                                    • simatec
                                      simatec Developer Most Active @Christian Kohlöffel last edited by

                                      @christian-kohlöffel Dann sieht es so aus, als ob dein User "iobroker" (dieser wird bei der Installation von iobroker angelegt) keinen Rechte auf Influx hat.

                                      Zeige mir mal die Ausgabe von:

                                      less /etc/group
                                      
                                      Christian Kohlöffel 1 Reply Last reply Reply Quote 0
                                      • Christian Kohlöffel
                                        Christian Kohlöffel @simatec last edited by

                                        @simatec said in Backitup kann influxdb Datenbank nicht sichern.:

                                        less /etc/group

                                        Und hier der output:

                                        pi@raspberrypi:~ $ less /etc/group
                                        root:x:0:
                                        daemon:x:1:
                                        bin:x:2:
                                        sys:x:3:
                                        adm:x:4:pi
                                        tty:x:5:iobroker
                                        disk:x:6:
                                        lp:x:7:
                                        mail:x:8:
                                        news:x:9:
                                        uucp:x:10:
                                        man:x:12:
                                        proxy:x:13:
                                        kmem:x:15:
                                        dialout:x:20:pi,iobroker
                                        fax:x:21:
                                        voice:x:22:
                                        cdrom:x:24:pi
                                        floppy:x:25:
                                        tape:x:26:
                                        sudo:x:27:pi
                                        audio:x:29:pi,iobroker
                                        dip:x:30:
                                        www-data:x:33:
                                        backup:x:34:
                                        operator:x:37:
                                        list:x:38:
                                        irc:x:39:
                                        src:x:40:
                                        gnats:x:41:
                                        shadow:x:42:
                                        utmp:x:43:
                                        video:x:44:pi,iobroker
                                        sasl:x:45:
                                        plugdev:x:46:pi
                                        staff:x:50:
                                        games:x:60:pi
                                        users:x:100:pi
                                        nogroup:x:65534:
                                        systemd-journal:x:101:
                                        systemd-timesync:x:102:
                                        systemd-network:x:103:
                                        systemd-resolve:x:104:
                                        input:x:105:pi
                                        kvm:x:106:
                                        render:x:107:
                                        crontab:x:108:
                                        netdev:x:109:pi
                                        pi:x:1000:
                                        messagebus:x:110:
                                        ssh:x:111:
                                        bluetooth:x:112:iobroker
                                        avahi:x:113:
                                        spi:x:999:pi
                                        i2c:x:998:pi,iobroker
                                        gpio:x:997:pi,iobroker
                                        systemd-coredump:x:996:
                                        iobroker:x:1001:pi
                                        influxdb:x:995:
                                        grafana:x:115:
                                        redis:x:114:iobroker
                                        mosquitto:x:116:
                                        
                                        
                                        simatec 1 Reply Last reply Reply Quote 0
                                        • simatec
                                          simatec Developer Most Active @Christian Kohlöffel last edited by

                                          @christian-kohlöffel sagte in Backitup kann influxdb Datenbank nicht sichern.:

                                          influxdb❌995:

                                          Sieht eigentlich gut aus. Bei mir lautet die Zeile zwar „influxdb❌998:“ aber das sollte nix ausmachen. Eventuell kannst du mal Testweise versuchen, den User iobroker in die influxdb Gruppe zu adden
                                          Danach aber den Reboot nicht vergessen

                                          Christian Kohlöffel 1 Reply Last reply Reply Quote 0
                                          • Christian Kohlöffel
                                            Christian Kohlöffel @simatec last edited by

                                            @simatec

                                            habe ich gemacht mit foldendem Befehl:

                                            pi@raspberrypi:~ $ sudo usermod -a -G influxdb iobroker
                                            
                                            less /etc/group
                                            

                                            zeigt nun folgendes an:

                                            influxdb:x:995:iobroker
                                            

                                            Keine Veränderung:

                                            5430) [iobroker/influxDB] [IGNORED] Error: Command failed: influxd backup -portable -database iobroker "/opt/iobroker/backups/influxDB_2021_04_07-20_22_35_backupiobroker"
                                            

                                            Aber ich habe gerade eine noch bisher nicht gekommen Fehlermeldung im Log entdeckt:

                                            backitup.0	2021-04-07 20:22:17.392	error	(5430) [iobroker] Backup folder not created: Error: EPERM: operation not permitted, chmod '/opt/iobroker/backups'Please reinstall backitup and run "iobroker fix"!!
                                            

                                            Könnte das der Grund sein? Ich mach mal was da dran steht ....

                                            Christian Kohlöffel 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            867
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            107
                                            7513
                                            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