Issues on restore of large virtualmin backups!

Hi

I’m currently in the process of migration all my clients from an existing virtualmin server (Ubuntu 20 Virtualmin 7.7) to a new server running up-to-date Virtualmin and Webmin on Debian 12.
I’m unable to restore them through web interface of Virtualmin as it timeouts (backup quite large in size).
I tried with command line tool but I have some issues too. First I did a backup of one of my virtual servers that I transfered on new server but when I try to restore it’s what happens:

root@myserver:/home/vincen/Bureau# virtualmin restore-domain --source myarchive.tar.gz --key C6708E4501521ED1 --all-domains --all-features
Checking for missing features ..
.. all features in backup are supported

Checking for errors in backup ..
.. no errors found

Starting restore..
Extracting backup archive file ..
.. backup was not signed with key C6708E4501521ED1 : gpg: chiffré avec une clef RSA de 2048 bits, identifiant C6708E4501521ED1, créée le 2021-03-14
      « My old backup key <xxxxx@xxxxxxxxxx> »
gpg: Signature faite le mar 26 nov 2024 14:30:52 CET
gpg:                avec la clef RSA 5AA75DEC2E26FEDE71A8AC17C6708E4501521ED1
gpg: Bonne signature de « My old backup key <xxxxx@xxxxxxxxxx> » [inconnu]
gpg: Attention : utilisation d'une clef sans confiance.


Backup does not contain virtual server information for missing domain customerdomainname.com.

When I did that I had also transferred in same directory the .dom and .info files created by backup process.

I then tried a different way: created a backup without encryption and just in zip to go faster but once transferred and trying to restore it:

root@myserver:/home/vincen/Bureau# virtualmin restore-domain --source customerdomain.com.zip --key C6708E4501521ED1 --all-domains --all-features
Failed to read backup file : Not a valid tar or tar.gz file

Why does it try to extract it as tar or tar.gz while it has a zip extension ?

Thanks

Vincèn

@vincen,

When you backed up the domain, did you specify that it was to use “zip” compression, or just tacked on the “.zip” extension?

@tpnsolutions good question :smiley: and not sure If I did both :confused: so I just regenerated properly this time the backup but I have an other problem to restore it. It uses by default the /tmp directory to extract archive and it’s a big issue. I have some accounts where archive will be quite large (hundreds of gigs) and I never planned to get a /tmp directory on my system that large :frowning:
I can’t find any way with virtualmin command in command line to specify a specific directory to use for extraction or to extract in current directory where archive is :frowning:

@vincen,

Typically the “/tmp/.webmin” directory is used temporarily for backups and restorations. If you have a partition that is bigger, and more suitable for this process, you could create a “mount point”, or even a “symbolic link”.

Ex.

*** the above creates a simple “symbolic link” pointing “/tmp/.webmin” to a new directory on a partition that can support the opperation. If you’re doing this permanently, creating a mount would likely be better. ***

@tpnsolutions Thanks I didn’t know symlink could be done with /tmp directories :wink: but unhappy it doesn’t work as after 1/2 minutes my symlink is overwritten by webmin that makes it again a regular directory :frowning:
Symlinks can’t be immutable so no idea if it’s possible to go around that issue :frowning:
Edit: found out I can change in webmin settings the temp directory it uses :slight_smile:

1 Like

@vincen,

Would you share where you made this change in Webmin for others who might have the same issue?

of course :slight_smile: it’s in Webmin → Webmin configuration → Advanced options.

1 Like

@vincen,

Awesome catch, and thanks for sharing with the community!

1 Like

I’m just not sure what is the option to Clear Temp Files ? If I understand it well it’s to get same behaviour than with default /tmp to clean it at each restart no ?