cancel
Showing results for 
Search instead for 
Did you mean: 

SVM On-Prem Backup Automation Tips

SVM On-Prem Backup Automation Tips

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
No ratings