Tilator
November 22, 2024, 1:40pm
1
There seems to be some older discussion about backup not working, but I think this issue is not yet resolved.
I made a good and working backup just four days ago. Now making a new one does not end up as expected.
Situation is same as it has been in past discussions. tar.gz file is downloaded and it can be opened by 7zip, but the tar file inside it is not readable.
Some old discussion told to rename the backup package by removing the .gz part of it because it seems to be a tar file.
Well - it's definitely not a simple tar file even though it can be opened after renaming it as a tar. That's because the backup file size is 15k and the tar file inside it is a bit more than 80k. The original backup file has to be some kind of compressed file even though it can be opened by renaming it as a tar file.
OpenWrt can't open it. There is no trace in dmesg.
Is there some kind of compression related CRC trouble that is overrided by naming gz file as a tar file? Something else?
brada4
November 22, 2024, 1:43pm
2
It is tar inside gzip, if you use internet explorer or safari they automatically open files from the internet and uncompress it.
Tilator
November 22, 2024, 1:49pm
3
I use Firefox. I did try Chrome too and the result is same.
And as I told, the backup file is not uncompressed, because it's 15k in size and tar inside it is 80k.
So it's definitely compressed file.
brada4
November 22, 2024, 2:52pm
4
Show this (I am getting completely valid backups)
ubus call system board
sysupgrade -L
Then create backup and download it via scp/sftp
sysupgrade -b /tmp/backup.tar.gz
And list file locally
zcat /tmp/backup.tar.gz | tar tvf -
Tilator
November 22, 2024, 3:00pm
5
Last command gives response:
tar: invalid tar magic
brada4
November 22, 2024, 3:03pm
6
Am I supposed to have crystal ball to guess your platform and file list changes?
Tilator
November 22, 2024, 3:08pm
9
Here:
`root@OpenWrt2:/tmp# sysupgrade -l
/etc/config/dhcp
/etc/config/dropbear
/etc/config/firewall
/etc/config/luci
/etc/config/network
/etc/config/openssl
/etc/config/php8-fastcgi
/etc/config/rpcd
/etc/config/samba4
/etc/config/system
/etc/config/ubootenv
/etc/config/uhttpd
/etc/config/wireless
/etc/crontabs/root
/etc/dropbear/dropbear_ed25519_host_key
/etc/dropbear/dropbear_rsa_host_key
/etc/fw_env.config
/etc/group
/etc/hosts
/etc/inittab
/etc/luci-uploads/.placeholder
/etc/nftables.d/10-custom-filter-chains.nft
/etc/nftables.d/README
/etc/opkg/keys/b5043e70f9a75cde
/etc/opkg/keys/d310c6f2833e97f7
/etc/passwd
/etc/php.ini
/etc/profile
/etc/rc.local
/etc/shadow
/etc/shells
/etc/shinit
/etc/ssl/mycert_.crt
/etc/ssl/mycert_.key
/etc/sysctl.conf
/etc/sysupgrade.conf
/www/_index_.html
/www/anturit.php
/www/anturit2.php
/www/cmd_line_ssh.php
/www/dyn_ant_b.php
/www/dyn_ant_b_cmd.php
/www/dyn_ant_t.php
/www/dyn_ant_t_cmd.php
/www/index.html
/www/lammitys.csv
/www/lammitys.php
/www/lampo1.php
/www/optio.php
/www/rele.php
/www/saato.csv
/www/saato.php
/www/termostaatti.php
/www/virta.php
`
I already did try to take all files off from backup configuration. It did not change result.
brada4
November 22, 2024, 3:12pm
10
Do the /www/* files fit in /tmp?
Tilator
November 22, 2024, 3:15pm
11
Here they are:
root@OpenWrt2:/tmp# ls -la /www/
drwxr-xr-x 1 root root 1488 Nov 22 13:50 .
drwxr-xr-x 1 root root 416 Jan 1 1970 ..
-rw-r--r-- 1 root root 838 Nov 5 12:33 _index_.html
-rw-r--r-- 1 root root 353 Nov 18 12:15 anturit.php
-rw-r--r-- 1 root root 1160 Nov 18 12:15 anturit2.php
drwxr-xr-x 2 root root 99 Nov 9 04:21 cgi-bin
-rw-r--r-- 1 root root 105 Nov 18 12:14 cmd_line_ssh.php
-rw-r--r-- 1 root root 517 Nov 18 12:13 dyn_ant_b.php
-rw-r--r-- 1 root root 440 Nov 18 12:13 dyn_ant_b_cmd.php
-rw-r--r-- 1 root root 534 Nov 22 13:44 dyn_ant_t.php
-rw-r--r-- 1 root root 385 Nov 22 14:02 dyn_ant_t_cmd.php
-rw-r--r-- 1 root root 835 Nov 5 12:34 index.html
-rw-r--r-- 1 root root 544 Nov 5 12:32 lammitys.csv
-rw-r--r-- 1 root root 1624 Nov 5 12:32 lammitys.php
-rw-r--r-- 1 root root 3117 Nov 18 12:04 lampo1.php
drwxr-xr-x 4 root root 106 Nov 9 04:21 luci-static
-rw-r--r-- 1 root root 434 Nov 18 12:01 optio.php
-rw-r--r-- 1 root root 504 Nov 5 12:34 rele.php
-rw-r--r-- 1 root root 423 Nov 5 12:30 saato.csv
-rw-r--r-- 1 root root 3264 Nov 5 12:30 saato.php
-rw-r--r-- 1 root root 1165 Nov 5 12:31 termostaatti.php
-rw-r--r-- 1 root root 680 Nov 5 12:31 virta.php
and:
root@OpenWrt2:/tmp# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 8.3M 8.3M 0 100% /rom
tmpfs 216.0M 496.0K 215.6M 0% /tmp
/dev/ubi0_1 88.5M 2.9M 81.1M 3% /overlay
overlayfs:/overlay 88.5M 2.9M 81.1M 3% /
tmpfs 512.0K 0 512.0K 0% /dev
root@OpenWrt2:/tmp#
and as I told, result is same if I take every file off the backup configuration.
Tilator
November 22, 2024, 3:19pm
12
root@OpenWrt2:/www# du -h
1.0K ./cgi-bin
55.0K ./luci-static/bootstrap
1.5K ./luci-static/resources/cbi
17.0K ./luci-static/resources/icons
55.0K ./luci-static/resources/protocol
9.0K ./luci-static/resources/svg
59.5K ./luci-static/resources/tools
1.0K ./luci-static/resources/view/bootstrap
60.5K ./luci-static/resources/view/firewall
4.5K ./luci-static/resources/view/modemmanager
190.0K ./luci-static/resources/view/network
32.0K ./luci-static/resources/view/status/include
121.0K ./luci-static/resources/view/status
5.0K ./luci-static/resources/view/system/led-trigger
60.0K ./luci-static/resources/view/system
9.5K ./luci-static/resources/view/uhttpd
475.5K ./luci-static/resources/view
895.0K ./luci-static/resources
950.0K ./luci-static
1023.0K .
root@OpenWrt2:/www#
Don’t think 7zip can open compressed file inside compressed file.
Have you tried extract the first file and then open the real secondary file.
Tilator
November 22, 2024, 3:25pm
14
Yes. I have.
If I take the tar ball (80k) out of it, 7zip can not open it.
But if I rename the (out taken) tar ball taking .tar off, it can open it correctly. All files are there.
So I suppose the tar is correct, but something happens while packing it.
Since the package can be opened and tar taken out of it, I suppose this has something to do with CRC.
B.T.W 7zip can open a tar ball in a compressed file. It can open fine the backup files I made four days ago.
egc
November 22, 2024, 3:32pm
15
My 7zip 24.07 for Windows can do that, it opens the inner tar just fine and I can look at my backups from DL-WRX36 , R7800 and EA8500
Tilator
November 22, 2024, 3:38pm
16
If I give command:
zcat /tmp/backup.tar.gz
the result seems to be OK on the console.
brada4
November 22, 2024, 3:45pm
17
Is it broken in both http and https?
If local file is OK then the problem is in downloading it.
Tilator
November 22, 2024, 3:47pm
18
Local file was not OK. It gove the " tar: invalid tar magic" error.
To be precise
zcat /tmp/backup.tar.gz | tar tvf -
gove error, but
zcat /tmp/backup.tar.gz
Seems to be OK
brada4
November 22, 2024, 3:49pm
19
Try
sysupgrade -v -v -v -b /tmp/backup.tar.gz
You are backing up "good" files, without accidentally including temporary files or huge blobs in homedir, it works nicely on 23.05.5
brada4
November 22, 2024, 3:50pm
20
What is the length of that file? 0-file is valid gzip....