Hello everybody,
I have now created a Python script to remove my old backups. My backup storage is mounted via NFS, so it behaves like a local directory.
In case anyone is interested, I’ve uploaded it to Github. To install, upload the purge_virtualmin_backups.py
and purge_backups.py
to /usr/local/sbin
and grant execute permission.
It can be configured as cron job in Virtualmin and should be executed after a full backup. It verifies that the last Virtualmin backup was successful and will then remove all old backups.
The cron command is:
/usr/local/sbin/purge_virtualmin_backups.py /path/to/backup