Virtualmin Backup, excluded directory dont work anymore (probably)

SYSTEM INFORMATION
OS type and version Ubuntu
Webmin version 2.303
Virtualmin version 7.30.8
Webserver version Apache 2.4.52
Related packages SUGGESTED

Since the 2nd May my scheduled backups fail without any warning, no log, nothing (most likely it may be a tar timeout or disk space error).
I have traced it now to a specific virtual server that contains a huge data directory that should be excluded from the backup (it is indicated in the exclude list as “data”) and worked finer until a couple weeks ago.

Any idea where I could get some hints of what the actual error may be ?
Has something changed in the way directories are excluded from the backup ?
Ideas ?

Did some more testing, the backup stops at “tar” and disk space keeps growing so I am almost certain that the data directory is not being excluded from the backup.

Maybe a python update may be the culprit ?

Thanks
Roberto

That itself seems unusual, do you have a email configured. I don’t have any files excluded so I can’t help there.

also maybe post what you have in here.

Here is some more info fro the backup setup:



that exclude item is not of the format required - see the instructive note on @stefan1959’s post above. it must be a realpath

If the directory I want to exclude is /home/user_name/data what shall I use ?

The instructions note says: “…To exclude an entire directory, provide the relative path from the user’s home directory, …”

so I put: “data”

please note that until last week the exclusion worked fine.

Am I missing something ? Maybe “data/” would work ?

So if you run a manual backup does it work? You should see the error if you run it this way.

It never completes, it hangs on “tar” for a specific virtual server (the one with the huge “data” directory).

Have you checked that the process has hung ? It maybe needing a long time to run, I have some domains that take over half an hour to compress the contents into a tar, I thought the process had hung to start with so I used htop and checking the tmp directory for file size changes and sure enough it eventually completed

Before (when it was working) the backup took about 14 minutes (excluding the big data directory).
Now it “hangs” meaning that it is still going after several hours (and the daily backup never completes) which is compatible with the fact that it is not excluding the big data directory fro the backup.
Is there a way to check the log (the script used to run the backup) to check that the exclusion actually works ?

Update:
I was able to run the backup manually using the API, command:
virtualmin backup-domain --dest xyz/backups/backup-2025-05-08-14-50 --all-domains --all-features --newformat --all-virtualmin --exclude data --strftime

The exclude directory format seems to be working fine, at least from the command line.

I may be possible that some old files or configuration is still around from when other backups failed, anyone knows where are temp files and settings stored during a backup ?

It is still possible that the UI does not create the backup commands correctly but I have no way of knowing, are the actual commands logged somewhere (maybe a verbose option ?)

Ideas ?

Update: daily backups keep failing while command line ones work fine.

Is there a way to check the actual commands that get executed by the scheduled backups ?
I would like to check what is happening.

The problem may not be related to the exclude directories like mentioned before but something is definitely stopping the backup.

I also set the options to continue on error but no log is produced.

Also (this may be a bug) if I run the backup from the command line and then go to “Backup&Restore/Running backups” I do see the backup currently running but if I click on the file instead of the command output I get the message: " Scheduled backup no longer exists!" but this is not a scheduled backup that is running.

To solve the issue I just wrote a backup script using the virtualmin backup api and put it into a cron. It works fine and does the same job as before (including the exclude directory part). Still do not know why doing the same thing using the UI did not work for me, I suspect some problems with the script created by the UI.
If someone can point me to where I can find the scripts generated by the backup UI and where the log files are (the ones showing which commands are executed) I can compare those with the one I use and try to pinpoint the problem.