Virtualmin backups archive formats problems - all tar, confirmed by 7-Zip team?

SYSTEM INFORMATION
OS type and version Debian 10
Webmin version All
Virtualmin version All
Related packages -

It seems that a zip backup is not actually a zip backup (all the other formats, are tars in fact), we hit this when reporting problems with tar decompression on Windows with 7-Zip. Just to be clear, nothing wrong with tar backups on the Virtualmin side, but with the other formats like zip. Suffice to say all the other formats were exhibiting the same 7-Zip behavior because they are tars 7-Zip / Discussion / Help: .tar.gz backups from Virtualmin: when extracted via 7-Zip on Windows: shows multiple numbered folders

Context - this was reported to 7-Zip as a problem with tars, best portrayed here Extracting the backup _dir folder via 7-zip shows multiple numbered folders in public_html

Can someone investigate this, maybe offer a fix, or remove the options like .zip, if not supported (would be cool to fix them though, for Windows users at least)?

Y’all please keep it civil.

I’ve asked @Jamie and @ilia if they know of any regression in this area, or if something else could explain this. Maybe zip isn’t installed on your system and some edge case bug falls back to using tar? I dunno.

1 Like

@fakemoth Does this problem happen upon scheduled backups or when downloading a backup?

If you click on backup compression format, you will see the following:

Can you tell us more about how exactly you are running a backup?

Do you backup virtual servers to a directory and still have an issue?

Thanks for answering - yes the zip command is installed, saw this on 2 different servers both had it installed. Seems like a fallback though - maybe there is some setting somewhere I can just flip to allow?

Thank you too @Ilia for taking an interest in this. Upon on demand backups - a single domain backed to directory. So you end up with a different format that falls under that bug (maybe a bug, don’t know exactly what it could be) in 7-Zip, which has a good user base on Windows.

Downloading in the browser is another case I guess?

The only option I found regarding something about zip is in the File Manager to enforce something something, guess it is not related, used for operations in the File Manager itself.

Switch to WinRar or similar :smile:

@fakemoth We discussed it internally and Jamie mentioned that it must be fixed (to have generated backup must comply with compression format selected on UI).

1 Like

Read the thread.

@unborn You should read it twice. Check also the other thread as for why, hints also here.

Thanks, good to know.

@Ilia will there be a theme fix to allow the format to be selected when downloading a backup? Currently the compression format field is being hidden …

I’ve checked in a change to respect the filename extension when backing up to a single file.

Yes, have been fixed already on the latest commits.

@Jamie, great. We need to add the same for downloads.

But for downloads, the user doesn’t enter a filename?

@Jamie, Correct, but the user must still be able to choose compression format.

Ok, I’ve fixed the bug that prevents the compression format selected from being respected.

2 Likes

Yes, this works correctly now, thanks @Jamie.

Alos, would this be possible to change compression format internally? zip supports both preservation of symbolic links (using -y) and file permissions. I am asking this, because presumably, if a user chooses to download a backup in zip format, it still won’t be possible for him/her to extract it (i.e. domname_dir), as internally all files are still not in zip format.

Thank you all for the effort put into solving this, appreciated!

1 Like

We could certainly add those flags when running the zip command. Will this still produce an archive that is valid on other operating systems though? I suspect that the main reason for using ZIP is so that the backup can be opened on Windows.

Yes, this would be logical to have embedded/internal archives match the parent format

Do you mean even if we compress embedded files using zip internally, it still will not work on Windows because of missing .zip file extension (on embedded files)?

I suspect that the main reason for using ZIP is so that the backup can be opened on Windows.

Yes, and to open it it must internally be using zip as well.

Perhaps we could just add .zip extension to the internal files? Would that require a lot of change to backup lib when restoring?