Problem with Backup Virtual Servers to Webmin server

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.5
Webmin version 2.520
Usermin version 2.420
Virtualmin version 7.40.1.pro
Theme version 25.20
Apache version 2.4.52
Package updates All installed packages are up to date

I was very excited to see the option to backup directly to a Webmin server as this will make backing up my system automatic and easy. Unfortunately, there are errors.

  1. The Webmin server that I was backing up to is behind a firewall and ports need to be opened. Fortunately, the error messages were informative. It should be pointed out that not only does port 10000 need to be open but 10001 and 10003 need to be opened for this to work. When I opened these ports, this part worked.
  2. Small virtual servers were successfully backed up. Unfortunately, larger virtual servers were not. If I have a server that is serveral gigs in size it will produce an error.

Unfortunately, this error did not occur until almost the entire script was run, taking a lot of time and did not save anything even on the source server so I did not have a local copy to download. The script needs to be fixed to allow the backup of large virtual servers. One of my servers is 11 gigs. My largest server is over 110 gigs. The backup of both of these servers failed. Smaller servers were successfully backed up.

Thanks,
Michael

Hello Michael!

Thanks for the feedback!

  1. Try opening ports 10000-10100 for it to be more reliable. We mention this in the Webmin documentation.
  2. Is anything useful logged in /var/webmin/miniserv.error when this error occurs?

Thanks for responding.

  1. I opened up ports 10000 to 10010. I had ports 10000 to 10005 opened before when the error I displayed occurred.
  2. I looked at the miniserv.error file and also the miniserv.log file and did not see anything interesting occurring at the time of this error. The time of the error was 10-15-2025 at around 16:20:49.

miniserv.error

miniserv.log

Now that I opened the additional ports, I will try tomorrow to see if it works, but do not think this change would make a difference.

Thanks for your help.
Michael

But you need to open a wider range of ports - -at least a hundred of them - 10000 - 10100. You appear to have opened only ten - 10000 - 10010. You need to correct this for Webmin / Virtualmin to function normally.

Sorry, I now opened up ports 10000 to 10100.

I ran a new backup to see if this fixed the problem but received the same error message.

I also looked at miniserv.error during this time and saw nothing of interest. Only redirects from http to https which really are not errors but are probably not related to this task.

The only error that I see is “error reading response length from fastpc.cgi”

I appreciate your help.
Thanks.
Michael

Just to show you that this works for smaller servers, here is an example of a backup that worked.

It is related to the size of the backup. The two that do not work are large virtual servers.

Thanks
Michael

Ok, assuming that it is the size of the backup which is triggering the issue, we see from the screenshots that archives of approximately 350 MB transfer successfully.

Pls tell us the size that fails.

I thought someone else had an issue with large backups and there was a hard limit of about 100GB. I could be wrong it is something that has just popped in my head.

So, this is the data that I have:

Site 1–4.16 m success
Site 2–179.12 m success
Site 3–337.47 m success
Site 4–1.1 g success
Site 5–12.5 g failure
Site 6–147.01 g failure

So, I know 1 g will backup successfully to a webmin server, but 12.5 g will not. Exactly where the cut-off is I don’t know.

Thanks

How much RAM does your target server have? Also, what is the output of this command on the target server:

journalctl -k | grep -i oom

RAM: 16g
output of journalctl -k l grep i oom

Thanks.
MHR

@Jamie, are we streaming files directly to the disk in RPC calls?

Yes, we are. Of course it will take a while, so it’s possible some timeout is being hit?

@mrivner How long does the process run before it fails?

I timed some of these backups;

  1. The 12.5 gig file failed after 17min 38 sec. Created the backup archive section was finished. As soon as uploading archive started the error message occurred–this was within a second from when this started
  2. The 1.1 gig file completed in 3 minutes–time for uploading archive 1 minute
  3. 337.47 meg file completed in 56 seconds

I still believe it is he size not the time that is important. The backup archive was created but the upload did not start and immediately gave the error message “error reading response length from fastpc.cgi”

Thanks.
Michael

I tested the time it took for my large backup to fail. This backup is 147.1 g. This backup ran for 1 hour 17 minutes and 50 seconds before it failed. Once again like the other backup that failed, the final backup archive was created. As soon as the “uploading archive to Webmin server” was started the backup failed immediately with the error “Error reading response length from fastpc.cgi”

To sum this up:
The 12.5 g files failed in 17 min 38 seconds after creating the final backup archive step. The 147.1 g files failed at the same step, as soon as the upload archive began. Here is the log of the key sections.

Hopefully this will give enough information for this error to be fixed.

Where is the file fastpc.cgi?

Thanks.
Michael

@Jamie, which timeouts are you thinking about?

I think the issue is this timeout here : webmin/fastrpc.cgi at master · webmin/webmin · GitHub

Since the tar.gz archive creation takes so long, the connection to the remote Webmin RPC server is timing out after 6 minutes.

This patch should fix it though : Refresh Webmin connection before uploading backups · virtualmin/virtualmin-gpl@7e9e7af · GitHub

Cool!

@mrivner Try applying this patch by running the following command to see if it fixes the original issue with large backups for you:

webmin patch https://github.com/virtualmin/virtualmin-gpl/commit/7e9e7af3

Thank you for working on this.

After applying the patch the process moved further along. It did not error immediately when the upload started but did error out.

However, looking at the destination server, it looked like the main archive file was uploaded.

The file in question was fam2025-10-26-19-33.tar.gz it looks like all of the file was uploaded. However, the .tar.gz.dom and the .tar.gz.info did not upload.

This is what the backup from this morning looked like on the source server. This is a different backup to a local destination but not much had changed since then.

So, it looks like there is progress here. I don’t know about the 140 g backup. If you want, I will try running it.

Thanks.
Michael