cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The Software Vulnerability Manager backend server creates daily backups and it can often exhaust a lot of free disk space depending on how many hosts you are scanning regularly and how much account data there is. The function you learn in this article can be customized further, or just used as provided.

To modify the number of days to see and delete backup for, modify the –mtime + number in the two commands presented next. Define the first function to display system backup files older than 30 days:

function show_backup { 
find /usr/local/Secunia/csi/backup -type f -name '*.sql.gz' -mtime +30 $1 

Define the second function that will delete the backup you just reviewed, effectively leaving you only with backup for the last 30 days. Customize your time periods accordingly depending on how fast your server grows by size due to backup storage consumption:

function del_old_backup { 
find /usr/local/Secunia/csi/backup -type f -name '*.sql.gz' -mtime +30 -exec rm {} \; $2 

Try the functions:

View backup older than 30 days and confirm that you want to delete it:

show_backup 

Delete backup older than 30 days after confirming that it is safe:

del_old_backup
Was this article helpful? Yes No
100% helpful (1/1)
Version history
Last update:
‎Sep 14, 2019 04:14 PM
Updated by: