simatec / ioBroker.backitup

ioBroker.backitup allows you to backup and restore your ioBroker installation and other systems, such as databases, Zigbee, scripts and many more.
MIT License
68 stars 35 forks source link

At restore, the configured SMB-version is ignored #1020

Closed ArneDoe closed 9 months ago

ArneDoe commented 10 months ago

DESCRIPTION: I configured "SMB-Typ = SMB 1.0" in the Adapter and made Backups which correctly use the option "vers=1.0" at mount. But when restoring from same old NAS, the option "vers=1.0" is not given for the mount and a restore is not possible.

REPRODUCE Preliminary: You need an old NAS for testing.

  1. Configure SMB V1.0 in Adapter
  2. Create a Backup on NAS. The option "vers=1.0" will be shown at the mount
  3. Restore the just made Backup. The option "vers=1.0" will not be used at the mount
  4. See error

EXPECTED BEHAVIOUR The configured SMB-option must be used at mount when restoring

LOGS OF RESTORE: Error: Command failed: sudo mount -t cifs -o username=backupper,password=****,rw,uid=iobroker,gid=iobroker,file_mode=0777,dir_mode=0777 //192.168.111.10/backupper/SMARTHOME/BACKUPS/teste-iob /opt/iobroker/backups Try mounting with vers=1.0.

VERSIONS:

simatec commented 10 months ago

Please post your Debuglog and your Config. What is the Type of NAS?

ArneDoe commented 10 months ago

A ~ ten year old Medion P89635 (MD 86803). No SW-updates anymore, SMB version not upgradable :-(

Sorry, ich habe die Logs nicht mehr. Ich kann aber einen LXC aufsetzen und das nochmal testen, wenn gewünscht. (Will es nicht auf meiner produktiven machen)...

simatec commented 10 months ago

cifs-utils installed?

ArneDoe commented 10 months ago

yes. Since this option WORKS when creating a backup, and DOES NOT work when making a restore: is it possible, that just the option is not taken into acount at restore time?

ArneDoe commented 10 months ago

I just made a BACKUP: Started iobroker ... [DEBUG] [mount] - mount activ... umount is started before mount!! [DEBUG] [mount] - umount successfully completed [DEBUG] [mount] start with {"mountType":"CIFS","type":"storage","source":null,"mount":"//192.168.111.10","debugging":true,"fileDir":"/opt/iobroker/iobroker-data/backitup","wakeOnLAN":false,"macAd":"","wolTime":"","wolPort":"9","smb":"vers=1.0","sudo":true,"cifsDomain":"","clientInodes":false,"deleteOldBackup":false,"ownDir":false,"bkpType":"Minimal","dir":"/backupper/SMARTHOME/BACKUPS/vm-iobroker-102","dirMinimal":"sharename/backupDir","user":"backupper","pass":"","ignoreErrors":false} [DEBUG] [mount] - noserverino option: false [DEBUG] [mount] - cifs-mount command: "sudo mount -t cifs -o username=backupper,password=,rw,uid=iobroker,gid=iobroker,file_mode=0777,dir_mode=0777,vers=1.0 //192.168.111.10/backupper/SMARTHOME/BACKUPS/vm-iobroker-102 /opt/iobroker/backups" [DEBUG] [mount] - mount successfully completed [DEBUG] [mount] - done [DEBUG] [iobroker] start with {"type":"creator","workDir":"/opt/iobroker/node_modules/iobroker.js-controller/iobroker.js","time":"02:30","debugging":true,"slaveBackup":"Single","everyXDays":"7","deleteBackupAfter":0,"cifs":{"enabled":true,"mountType":"CIFS","type":"storage","source":null,"mount":"//192.168.111.10","debugging":true,"fileDir":"/opt/iobroker/iobroker-data/backitup","wakeOnLAN":false,"macAd":"","wolTime":"","wolPort":"9","smb":"vers=1.0","sudo":true,"cifsDomain":"","clientInodes":false,"deleteOldBackup":false,"ownDir":false,"bkpType":"Minimal","dir":"/backupper/SMARTHOME/BACKUPS/vm-iobroker-102","dirMinimal":"sharename/backupDir","user":"backupper","pass":"","ignoreErrors":false,"context":{"fileNames":[],"errors":{},"done":["umount","mount"],"types":[]},"adapter":null,"influxDBEvents":[],"mySqlEvents":[],"pgSqlEvents":[]},"ignoreErrors":false,"dir":"/opt/iobroker","historyHTML":{"enabled":true,"type":"message","entriesNumber":"10","ignoreErrors":false,"systemLang":"de"},"historyJSON":{"enabled":true,"type":"message","entriesNumber":"10","ignoreErrors":false,"systemLang":"de"},"telegram":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"telegram.0","SilentNotice":false,"NoticeType":"longTelegramNotice","User":"allTelegramUsers","onlyError":false,"telegramWaiting":2000,"hostName":"","ignoreErrors":false,"systemLang":"de"},"email":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"email.0","NoticeType":"longEmailNotice","emailReceiver":"xxx@xxx.com","emailSender":"xxx@xxx.com","onlyError":false,"emailWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"pushover":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","SilentNotice":false,"NoticeType":"longPushoverNotice","deviceID":"","onlyError":false,"pushoverWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"whatsapp":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":"longWhatsappNotice","onlyError":false,"whatsappWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"signal":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":"longSignalNotice","onlyError":false,"signalWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"matrix":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":"longMatrixNotice","onlyError":false,"matrixWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"discord":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":null,"target":"","onlyError":false,"discordWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"backupDir":"/opt/iobroker/backups"} [DEBUG] [iobroker] - host.vm-iobroker-102 11175 states saved [DEBUG] [iobroker] - host.vm-iobroker-102 12042 objects saved [DEBUG] [iobroker] - Backup created: /opt/iobroker/backups/iobroker_2023_11_02-16_23_58_backupiobroker.tar.gz [DEBUG] [iobroker] - This backup can only be restored with js-controller version up from 4.1 [DEBUG] [iobroker] - done [DEBUG] [cifs] - used copy path: /backupper/SMARTHOME/BACKUPS/vm-iobroker-102 [DEBUG] [cifs] - done [DEBUG] [cifs] start with {"mountType":"CIFS","type":"storage","source":null,"mount":"//192.168.111.10","debugging":true,"fileDir":"/opt/iobroker/iobroker-data/backitup","wakeOnLAN":false,"macAd":"","wolTime":"","wolPort":"9","smb":"vers=1.0","sudo":true,"cifsDomain":"","clientInodes":false,"deleteOldBackup":false,"ownDir":false,"bkpType":"Minimal","dir":"/backupper/SMARTHOME/BACKUPS/vm-iobroker-102","dirMinimal":"sharename/backupDir","user":"backupper","pass":"","ignoreErrors":false,"backupDir":"/opt/iobroker/backups","influxDBEvents":[],"mySqlEvents":[],"pgSqlEvents":[],"deleteBackupAfter":0} [DEBUG] [clean] - No older backup files are deleted, because this backup was started manually [DEBUG] [clean] - done [DEBUG] [telegram] start with {"type":"creator","workDir":"/opt/iobroker/node_modules/iobroker.js-controller/iobroker.js","time":"02:30","debugging":true,"slaveBackup":"Single","everyXDays":"7","deleteBackupAfter":0,"cifs":{"enabled":true,"mountType":"CIFS","type":"storage","source":null,"mount":"//192.168.111.10","debugging":true,"fileDir":"/opt/iobroker/iobroker-data/backitup","wakeOnLAN":false,"macAd":"","wolTime":"","wolPort":"9","smb":"vers=1.0","sudo":true,"cifsDomain":"","clientInodes":false,"deleteOldBackup":false,"ownDir":false,"bkpType":"Minimal","dir":"/backupper/SMARTHOME/BACKUPS/vm-iobroker-102","dirMinimal":"sharename/backupDir","user":"backupper","pass":"","ignoreErrors":false,"context":{"fileNames":["/opt/iobroker/backups/iobroker_2023_11_02-16_23_58_backupiobroker.tar.gz"],"errors":{},"done":["umount","mount","iobroker"],"types":["iobroker"]},"adapter":null,"influxDBEvents":[],"mySqlEvents":[],"pgSqlEvents":[]},"ignoreErrors":false,"dir":"/opt/iobroker","historyHTML":{"enabled":true,"type":"message","entriesNumber":"10","ignoreErrors":false,"systemLang":"de"},"historyJSON":{"enabled":true,"type":"message","entriesNumber":"10","ignoreErrors":false,"systemLang":"de"},"telegram":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"telegram.0","SilentNotice":false,"NoticeType":"longTelegramNotice","User":"allTelegramUsers","onlyError":false,"telegramWaiting":2000,"hostName":"","ignoreErrors":false,"systemLang":"de","time":"02. November 2023 um 16:24 Uhr"},"email":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"email.0","NoticeType":"longEmailNotice","emailReceiver":"xxx@xxx.com","emailSender":"xxx@xxx.com","onlyError":false,"emailWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"pushover":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","SilentNotice":false,"NoticeType":"longPushoverNotice","deviceID":"","onlyError":false,"pushoverWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"whatsapp":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":"longWhatsappNotice","onlyError":false,"whatsappWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"signal":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":"longSignalNotice","onlyError":false,"signalWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"matrix":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":"longMatrixNotice","onlyError":false,"matrixWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"discord":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":null,"target":"","onlyError":false,"discordWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"backupDir":"/opt/iobroker/backups","influxDBEvents":[],"mySqlEvents":[],"pgSqlEvents":[]} [DEBUG] [telegram] - [iobroker] used Telegram-Instance: telegram.0 [DEBUG] [telegram] - done [DEBUG] [historyHTML] - new history html values created [DEBUG] [historyHTML] - done [DEBUG] [historyHTML] start with {"type":"creator","workDir":"/opt/iobroker/node_modules/iobroker.js-controller/iobroker.js","time":"02:30","debugging":true,"slaveBackup":"Single","everyXDays":"7","deleteBackupAfter":0,"cifs":{"enabled":true,"mountType":"CIFS","type":"storage","source":null,"mount":"//192.168.111.10","debugging":true,"fileDir":"/opt/iobroker/iobroker-data/backitup","wakeOnLAN":false,"macAd":"","wolTime":"","wolPort":"9","smb":"vers=1.0","sudo":true,"cifsDomain":"","clientInodes":false,"deleteOldBackup":false,"ownDir":false,"bkpType":"Minimal","dir":"/backupper/SMARTHOME/BACKUPS/vm-iobroker-102","dirMinimal":"sharename/backupDir","user":"backupper","pass":"","ignoreErrors":false,"context":{"fileNames":["/opt/iobroker/backups/iobroker_2023_11_02-16_23_58_backupiobroker.tar.gz"],"errors":{},"done":["umount","mount","iobroker"],"types":["iobroker"]},"adapter":null,"influxDBEvents":[],"mySqlEvents":[],"pgSqlEvents":[]},"ignoreErrors":false,"dir":"/opt/iobroker","historyHTML":{"enabled":true,"type":"message","entriesNumber":"10","ignoreErrors":false,"systemLang":"de","time":"02. November 2023 um 16:24 Uhr"},"historyJSON":{"enabled":true,"type":"message","entriesNumber":"10","ignoreErrors":false,"systemLang":"de"},"telegram":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"telegram.0","SilentNotice":false,"NoticeType":"longTelegramNotice","User":"allTelegramUsers","onlyError":false,"telegramWaiting":2000,"hostName":"","ignoreErrors":false,"systemLang":"de"},"email":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"email.0","NoticeType":"longEmailNotice","emailReceiver":"xxx@xxx.com","emailSender":"xxx@xxx.com","onlyError":false,"emailWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"pushover":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","SilentNotice":false,"NoticeType":"longPushoverNotice","deviceID":"","onlyError":false,"pushoverWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"whatsapp":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":"longWhatsappNotice","onlyError":false,"whatsappWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"signal":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":"longSignalNotice","onlyError":false,"signalWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"matrix":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":"longMatrixNotice","onlyError":false,"matrixWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"discord":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":null,"target":"","onlyError":false,"discordWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"backupDir":"/opt/iobroker/backups","influxDBEvents":[],"mySqlEvents":[],"pgSqlEvents":[]} [DEBUG] [historyJSON] - new history json values created [DEBUG] [historyJSON] - done [DEBUG] [umount] - mount activ, umount is started ... [DEBUG] [historyJSON] start with {"type":"creator","workDir":"/opt/iobroker/node_modules/iobroker.js-controller/iobroker.js","time":"02:30","debugging":true,"slaveBackup":"Single","everyXDays":"7","deleteBackupAfter":0,"cifs":{"enabled":true,"mountType":"CIFS","type":"storage","source":null,"mount":"//192.168.111.10","debugging":true,"fileDir":"/opt/iobroker/iobroker-data/backitup","wakeOnLAN":false,"macAd":"","wolTime":"","wolPort":"9","smb":"vers=1.0","sudo":true,"cifsDomain":"","clientInodes":false,"deleteOldBackup":false,"ownDir":false,"bkpType":"Minimal","dir":"/backupper/SMARTHOME/BACKUPS/vm-iobroker-102","dirMinimal":"sharename/backupDir","user":"backupper","pass":"","ignoreErrors":false,"context":{"fileNames":["/opt/iobroker/backups/iobroker_2023_11_02-16_23_58_backupiobroker.tar.gz"],"errors":{},"done":["umount","mount","iobroker"],"types":["iobroker"]},"adapter":null,"influxDBEvents":[],"mySqlEvents":[],"pgSqlEvents":[]},"ignoreErrors":false,"dir":"/opt/iobroker","historyHTML":{"enabled":true,"type":"message","entriesNumber":"10","ignoreErrors":false,"systemLang":"de"},"historyJSON":{"enabled":true,"type":"message","entriesNumber":"10","ignoreErrors":false,"systemLang":"de","time":"02. November 2023 um 16:24 Uhr"},"telegram":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"telegram.0","SilentNotice":false,"NoticeType":"longTelegramNotice","User":"allTelegramUsers","onlyError":false,"telegramWaiting":2000,"hostName":"","ignoreErrors":false,"systemLang":"de"},"email":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"email.0","NoticeType":"longEmailNotice","emailReceiver":"xxx@xxx.com","emailSender":"xxx@xxx.com","onlyError":false,"emailWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"pushover":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","SilentNotice":false,"NoticeType":"longPushoverNotice","deviceID":"","onlyError":false,"pushoverWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"whatsapp":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":"longWhatsappNotice","onlyError":false,"whatsappWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"signal":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":"longSignalNotice","onlyError":false,"signalWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"matrix":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":"longMatrixNotice","onlyError":false,"matrixWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"discord":{"enabled":true,"notificationsType":"Telegram","type":"message","instance":"","NoticeType":null,"target":"","onlyError":false,"discordWaiting":0,"hostName":"","ignoreErrors":false,"systemLang":"de"},"backupDir":"/opt/iobroker/backups","influxDBEvents":[],"mySqlEvents":[],"pgSqlEvents":[]} [DEBUG] [umount] start with {"mountType":"CIFS","type":"storage","source":null,"mount":"//192.168.111.10","debugging":true,"fileDir":"/opt/iobroker/iobroker-data/backitup","wakeOnLAN":false,"macAd":"","wolTime":"","wolPort":"9","smb":"vers=1.0","sudo":true,"cifsDomain":"","clientInodes":false,"deleteOldBackup":false,"ownDir":false,"bkpType":"Minimal","dir":"/backupper/SMARTHOME/BACKUPS/vm-iobroker-102","dirMinimal":"sharename/backupDir","user":"backupper","pass":"","ignoreErrors":false,"backupDir":"/opt/iobroker/backups","influxDBEvents":[],"mySqlEvents":[],"pgSqlEvents":[]} [DEBUG] [umount] - umount successfully completed [DEBUG] [umount] - done [EXIT] 0

and a RESTORE: 2023-11-02 16:31:09.317 - info: backitup.0 (41807) starting. Version 2.8.1 in /opt/iobroker/node_modules/iobroker.backitup, node: v18.18.2, js-controller: 5.0.12 2023-11-02 16:31:09.989 - info: backitup.0 (41807) [iobroker] backup will be activated at 02:30 every 7 day(s) 2023-11-02 16:31:10.562 - error: backitup.0 (41807) Error: Command failed: sudo mount -t cifs -o username=backupper,password=,rw,uid=iobroker,gid=iobroker,file_mode=0777,dir_mode=0777 //192.168.111.10/backupper/SMARTHOME/BACKUPS/vm-iobroker-102 /opt/iobroker/backups mount error(104): Connection reset by peer Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) 2023-11-02 16:31:31.071 - info: backitup.0 (41807) cleaned everything up... 2023-11-02 16:31:31.079 - info: backitup.0 (41807) Got terminate signal TERMINATE_YOURSELF 2023-11-02 16:31:31.081 - info: backitup.0 (41807) terminating 2023-11-02 16:31:31.083 - info: backitup.0 (41807) Terminated (NO_ERROR): Without reason 2023-11-02 16:31:31.576 - info: backitup.0 (41807) terminating 2023-11-02 16:33:32.696 - info: backitup.0 (42040) starting. Version 2.8.1 in /opt/iobroker/node_modules/iobroker.backitup, node: v18.18.2, js-controller: 5.0.12 2023-11-02 16:33:32.769 - info: backitup.0 (42040) [iobroker] backup will be activated at 02:30 every 7 day(s) 2023-11-02 16:33:33.332 - error: backitup.0 (42040) Error: Command failed: sudo mount -t cifs -o username=backupper,password=,rw,uid=iobroker,gid=iobroker,file_mode=0777,dir_mode=0777 //192.168.111.10/backupper/SMARTHOME/BACKUPS/vm-iobroker-102 /opt/iobroker/backups mount error: Server abruptly closed the connection. This can happen if the server does not support the SMB version you are trying to use. The default SMB version recently changed from SMB1 to SMB2.1 and above. Try mounting with vers=1.0. mount error(112): Host is down Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) 2023-11-02 16:34:00.105 - info: backitup.0 (42040) Got terminate signal TERMINATE_YOURSELF 2023-11-02 16:34:00.107 - info: backitup.0 (42040) cleaned everything up... 2023-11-02 16:34:00.107 - info: backitup.0 (42040) terminating 2023-11-02 16:34:00.108 - info: backitup.0 (42040) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason 2023-11-02 16:34:00.610 - info: backitup.0 (42040) terminating 2023-11-02 16:34:05.132 - info: backitup.0 (42151) starting. Version 2.8.1 in /opt/iobroker/node_modules/iobroker.backitup, node: v18.18.2, js-controller: 5.0.12 2023-11-02 16:34:05.196 - info: backitup.0 (42151) [iobroker] backup will be activated at 02:30 every 7 day(s) hth, Arne.

ArneDoe commented 10 months ago

The error message mount error(112): Host is down does NOT mean, the host/NAS is down. Is wrong message for "i can't talk to this old SMB-protocol" or something like that.

simatec commented 10 months ago

Is your NAS in standby mode? Are you using WOL?

ArneDoe commented 10 months ago

No WOL. Normally, NAS goes to standby. When the mount is executed, it starts reliably for the Backup and also for the Restore. When i was testing (see logs), NAS was running, not in Standby.

simatec @.***> schrieb am So., 5. Nov. 2023, 21:57:

Is your NAS in standby mode? Are you using WOL?

— Reply to this email directly, view it on GitHub https://github.com/simatec/ioBroker.backitup/issues/1020#issuecomment-1793843714, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOTPCTUTFYCXO5QNVPDNXTYC74UTAVCNFSM6AAAAAA62AZMVWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTHA2DGNZRGQ . You are receiving this because you authored the thread.Message ID: @.***>

simatec commented 9 months ago

Please switch to a current smb version that your NAS supports. smbv1 is no longer the right way to go