Suggestion for transfer virtual server: delete the gzip files just after ungziptaring them and not only at the end

**Operating system: Ubuntu **
OS version: 20.04

Hi Virtualmin team,
Here a suggestion for tightly dimmensioned servers:

I noticed when transferring a large virtual server (only virtual server on the server with a very large MySql database) to a right-sized (not a lot of extra-space) new server, using the “transfer virtual server” menu, that the large gzip-tar-ed file that got transferred by scp between the 2 servers in /tmp/transfer-… (not sure about the exact name, but it was in /tmp) was still there until end of installation, and not deleted right after un-gzip-taring it. So while restoring the database I ran out of disk space, and the restore stalled until I deleted those gzip files.

The extra-space used there is quite larger than the space that will be needed for scheduled backups of the site.

Those files could be deleted already right after un-gzip-taring them, allowing to restore large sites without needing a lot more extra-space.

Maybe same applies to restoring any remote backup ? In which case that would make a lot of sense in case of emergency-restore situations…

Complement: The directory where the gziptared files could be deleted way earlier in the transfer process is like /tmp/virtualmin-transfer-5285/ , as it is exactracted into another tmp directory before being restored in place.

So the transfer of a virtual host from one server to another temporarily uses 2-3 times the final size of the virtual host!

So a further backup restore optimization would be to delete each of the files that get unzipped from the base file as soon as they have been used.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.