Manual interruption of a running scheduled backup, not properly interrupted

At first I reported it in https://www.virtualmin.com/node/60457 but then I remembered I should have done it in the bug tracker, apologies.

I'll copy-paste what I wrote there, but just to be clear, it's not a plea for help, just a bug report.

I think I found a bug within virtualmin, but maybe that's actually normal and part of how the software ought to operate properly. So, well, I'm not sure, I come here to report it just in case.

Long story short: in Virtualmin admin > running backups, even if I toggle the currently running backup and successfully click to stop it, meanwhile, I will observe the tar creation process hasn't halted and is still ongoing even several minutes later.

How I found out: I made a silly mistake while creating a new scheduled backup, and asked virtualmin to backup over 150 GB of stuff (I totally screwed up, forgetting to exclude a directory where I store other stuff non-relevant to that website, I find it convenient to have an online ultimate resort backup location). Soon enough I realized I screwed up, so I went in the "running backups" submenu and successfully ended the backup. But on my server, 15 minutes later, the tarball is still being created, now in the 120 GB size and still growing every time I refresh the directory listing. And indeed, in the list of the running processes on the server, I found /bin/tar cfX - /var/tmp/webmintemp//40656_26341_5_backup.cgi --listed-incremental=/etc/webmin/virtual-server/incremental/13244744245671 .

I'll let the command line run to its end, it will be a close call but there'll be enough hard disk left, so I'm cool with it. But, still, I am not sure this is a "normal" behaviour, maybe that's a bug, and it's good that I report it then :)

Status: 
Closed (fixed)

Comments

Was the backup.cgi process that launched that tar command killed, and did the backup disappear from the list of running backups?

Negative, Jamie. As soon as I calculated I had enough spare disk space to let the process run to its end, I gave up. Who knows, maybe killing the tarball creation manually might have caused issues, so I chose to play it safe.

I only used the virtualmin web-based interface to try to interrupt the backup ( homeurl:port/virtual-server/list_running.cgi?xnavigation=1 ), and in that page, I got the confirmation that the running backup was successfully stopped.

Sorry I can't help much more than that with the bug report.

So did you kill the tar command before killing the backup in the Virtualmin UI? Because just killing tar may not cause the whole backup to fail ... it may just go onto the next domain.

Oh, no. I did not kill the tar command at all.

In order, what happened, and everything that happened, was - creating the backup schedule - launching it - realizing I forgot to exclude what had no place in there - going in Virtualmin > Backup And Restore > Running Backups, checking the currently running backup, clicking to interrupt it, confirming with the eye that virtualmin returned a confirmation message that it was stopped - later, finding by sftp that the backup folder had a huge tarball still growing - return to virtualmin's server status page, click the CPU list to view all the processes ( proc/index_cpu.cgi?xnavigation=1 ), control-F for tar, copy the info into a note file

That was all, I did NOT try to kill the tar creation process, in fear of causing additional issues.

Status:
Active
»
Closed (fixed)

Ok, it looks like the real issue is that Virtualmin doesn't kill the tar command when killing the main backup process, which can cause it to keep running till completion. I'll fix this in the next release.

Status: Fixed ยป Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.