Expired Backups not removed from SFTP storage

SYSTEM INFORMATION
OS type and version Debian 13
Webmin version 2.621
Virtualmin version 8.0.1 GPL

Backup creation to SFTP target succeeds , but automatic deletion does not remove the files from storage. Manual deletion is also not possible (“Deletion of remote backups is not supported yet”).

Backup & Restore should be a core functionality, I would classify this as A BUG.

1 Like

Can you explain more about this? What do you mean by that?

1 Like

See screenshot above.
I must say, backup and restore so far came with a lot of bugs on a fresh Debian 13. Im currently evaluating Webmin for more deployments, coming from Plesk.

1 Like

Considering the user base, ‘contribute back’ is kinda woeful at best. Even thoughtful feed back is helpful.

There’s no such thing as “a lot of bug,” since bugs are specific issues that can be listed clearly and reproduced. If you can break it down for us, we’ll fix it.

And also, SFTP backup purging is added for the upcoming Virtualmin 8.1.0 release.

You can use SSH for now, or take the risk of applying the patch with the webmin patch command to see how SFTP backup purging works for you.

1 Like

Do you mean Virtualmin 8.1.0 :smiley:

1 Like

Yes, I opened tickets for all issues:

  1. This ticket
  2. https://forum.virtualmin.com/t/backup-and-restore-failures-no-space-left-on-device/
  3. https://forum.virtualmin.com/t/backup-deletion-fails-and-nearly-crashes-server/

Number 3 is also highly critical in my eyes

By the way, as the first screenshot at the top indicates, Virtualmin seems to attempt to delete SCHEDULED SFTP backups via SSH already and indicates success (“deleted 44 Bytes”) but the backup actually remains on SFTP storage.

This ticket is about SFTP backups not being cleared, and it should already be fixed. Please apply the patch below, try again, and let us know if it works for you and if issue #3 is also resolved.

webmin patch https://github.com/virtualmin/virtualmin-gpl/commit/58b379c

Tried to apply the patch but it looks to me that it didnt go through…?

root@sv1:~# webmin patch https://github.com/virtualmin/virtualmin-gpl/commit/58b379c
Patch failed: Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|From 58b379ca33ee8ed7bf036d64ac14c58c1f4cf25b Mon Sep 17 00:00:00 2001
|From: Jamie Cameron <XXXXXX@webmin.com>
|Date: Mon, 5 Jan 2026 16:53:45 -0800
|Subject: [PATCH] Add support for purging SFTP backups
|
|---
| backups-lib.pl | 63 ++++++++++++++++++++++++++++++++++++++++++++++----
| lang/en        |  2 ++
| 2 files changed, 61 insertions(+), 4 deletions(-)
|
|diff --git a/backups-lib.pl b/backups-lib.pl
|index eeee385af..5ce01f9b9 100755
|--- a/backups-lib.pl
|+++ b/backups-lib.pl
--------------------------
patching file backups-lib.pl
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
Hunk #1 ignored at 5749.
Hunk #2 ignored at 5949.
Hunk #3 ignored at 6769.
3 out of 3 hunks ignored -- saving rejects to file backups-lib.pl.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/lang/en b/lang/en
|index 8695670f2..ad44aa4c6 100644
|--- a/lang/en
|+++ b/lang/en
--------------------------
patching file lang/en
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
Hunk #1 ignored at 2932.
1 out of 1 hunk ignored -- saving rejects to file lang/en.rej
done

That’s right! I missed that there were many more separate changes instead of one PR, which would have been easier to apply.

Sorry, in this case, the only way to try it is to install the latest development version of Virtualmin. However, we don’t recommend doing that unless you are an experienced user or a developer who knows what you’re doing.

Ok, what is the time schedule for the next official release ?

We can’t say exactly, but it’s expected within a few days or weeks.

Any chance I can patch the files manually ?

1 Like

There isn’t a straightforward way to patch it. It’s generally safer to install the development version instead of applying a manual patch, since it involves quite a few files.

1 Like

Is it safe (i’ve done it the past but never asked) just to copy the whole content from the github
ie

and replace whats in the file on the server (2 files by the patch).

creating backups on server of the files of cause.

Whether it’s safe or not depends on the type of change. In this case, there were many changes made, in different files which makes it difficult to upgrade by copy/pasting the code.

If you really want to try the latest features, you can use a nightly Virtualmin build. If you don’t like it or something doesn’t work, you can always downgrade.