Backup to .tar but Restore ask for .gz

Just to report that LuCI menu for Backup generates an archive backup-OpenWrt-date.tar but then the same LuCI menu for Restore does not accept the .tar file (expects .gz file).

tried this workaround: copied the .tar file to /tmp using scp and then

sysupgrade -r /tmp/backup-OpenWrt-2020-11-06-3.tar

but did't solve the issue (sysupgrade also expects .gz type file)

On 19.07.4, the backup produces a .tar.gz file.

A tar.gz file is merely a tar file that has been compressed by running the complete tar file through gzip. Most implementations of tar link the gzip library so they can do this in one step.

2 Likes

Noticed a similar problem following sysupgrade from 18.06.x to 19.07.5 after making configurations manually did a backup create archive and saved file had extension .tar but was really a .tar.gz file. Renaming it with extension .tar.gz allowed it to be correctly opened and viewed in archive viewer.

Tried installing software package gzip and also lua-lzlib with same results on creating archive. Then realized it occurred when saving file the filename was changed to avoid overwriting existing file and that is when it was saved with only the .tar extension. I suspect adding the extra packages is not needed but did not uninstall and retest.

Not sure if the create archive function can be improved to ensure the archive extension is always .tar.gz to match the contents of the file.

[Added: I did subsequently test that the extra packages are not needed. The file extension is only abbreviated when the filename is changed and this may have to do with the OS being used at the time which was Windows. There is probably nothing else needed except to be careful when renaming file on saving it or alternatively after saving file rename it and ensure it has the ".tar.gz" extension.]