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
69 stars 35 forks source link

CCU Backup: Output file corrupt/empty #1072

Closed Black-Thunder closed 8 months ago

Black-Thunder commented 8 months ago

Describe the bug
I've just noticed that my CCU backups are broken and just 1KB small. In the log everything looks fine, no errors/warnings.

Started ccu ...
[DEBUG] [mount] - cifs-mount command: "sudo mount -t cifs -o username=iobroker_backup,password=****,rw,uid=iobroker,gid=iobroker,file_mode=0777,dir_mode=0777,vers=3.1.1 //192.168.2.5/Backups/ioBroker /opt/iobroker/backups"
[DEBUG] [mount] - mount successfully completed
[DEBUG] [mount] - done
[DEBUG] [ccu] - CCU-Backup started ...
[DEBUG] [ccu] - CCU Version: 3.73.9.20231130
[DEBUG] [ccu] - Requesting backup from CCU
[DEBUG] [ccu] - CCU Session logout successful
[DEBUG] [ccu] - CCU-Backup is finish
[DEBUG] [ccu] - done
[DEBUG] [cifs] - used copy path: /Backups/ioBroker
[DEBUG] [cifs] - done
[DEBUG] [clean] - No older backup files are deleted, because this backup was started manually
[DEBUG] [clean] - done
[DEBUG] [pushover] - done
[DEBUG] [historyHTML] - new history html values created
[DEBUG] [historyHTML] - done
[DEBUG] [historyJSON] - new history json values created
[DEBUG] [historyJSON] - done
[DEBUG] [umount] - mount activ, umount is started ...
[DEBUG] [umount] - umount successfully completed
[DEBUG] [umount] - done
[EXIT] 0

The content of these corrupt backup files is always the same:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<div class="CLASS10600"><a href="#" onclick="javascript:reloadPage();">Weiter</a></div>
</html>

If I manually initiate a backup directly in RaspberryMatic, the file is created correctly (file size 650KB).

image

I've also tried the current stable v2.9.8, but it has the same issue. So I can't really tell whether something in the backitup adapter has changed some time ago or my configuration is broken somehow. Any ideas?

Versions:

simatec commented 8 months ago

I can't really recreate it... The backup works without any problems and it is not defective.

***@iobroker-dev:/opt/iobroker/backups$ ls -l home*
-rw-rw-r--+ 1 iobroker iobroker 2652586 15. Jan 17:21 homematic_2024_01_15-17_20_57_3.67.10_backupiobroker.tar.sbk
-rw-rw-r--+ 1 iobroker iobroker 2652586 15. Jan 17:30 homematic_2024_01_15-17_30_55_3.67.10_backupiobroker.tar.sbk
-rw-rw-r--+ 1 iobroker iobroker 2652586 16. Jan 01:30 homematic_2024_01_16-01_30_11_3.67.10_backupiobroker.tar.sbk
-rw-rw-r--+ 1 iobroker iobroker 2652586 22. Jan 10:59 homematic_2024_01_22-10_59_42_3.67.10_backupiobroker.tar.sbk
-rw-rw-r--+ 1 iobroker iobroker 2652586 22. Jan 14:12 homematic_2024_01_22-14_12_35_3.67.10_backupiobroker.tar.sbk
-rw-rw-r--+ 1 iobroker iobroker 2652586 22. Jan 14:17 homematic_2024_01_22-14_17_47_3.67.10_backupiobroker.tar.sbk
-rw-rw-r--+ 1 iobroker iobroker 2652586 22. Jan 14:18 homematic_2024_01_22-14_18_15_3.67.10_backupiobroker.tar.sbk
-rw-rw-r--+ 1 iobroker iobroker 2652586 22. Jan 14:25 homematic_2024_01_22-14_25_18_3.67.10_backupiobroker.tar.sbk
-rw-rw-r--+ 1 iobroker iobroker 2652586 23. Jan 21:29 homematic_2024_01_23-21_29_03_3.67.10_backupiobroker.tar.sbk
-rw-rw-r--+ 1 iobroker iobroker 2652586 25. Jan 01:30 homematic_2024_01_25-01_30_11_3.67.10_backupiobroker.tar.sbk
-rw-rw-r--+ 1 iobroker iobroker 2652586 30. Jan 11:16 homematic_2024_01_30-11_16_40_3.67.10_backupiobroker.tar.sbk

Please post your settings in JSON format

Black-Thunder commented 8 months ago

system.adapter.backitup.0.json

simatec commented 8 months ago

Please use the CCU user "Admin" with the corresponding password for the backup. Otherwise restart the CCU and the iobroker system.

Alternatively, deactivate https on the CCU for testing purposes and switch it off in Backitup

Black-Thunder commented 8 months ago

Yes, you're right. With the "Admin" user the backup is correctly created. Apparently you need admin privileges to create a backup which I didn't think of.

Sorry for the confusion 🙈