How to I bulk delete Automated backups

Re: How to I bulk delete Automated backups

by Julia Küfner -
Number of replies: 0

Thank you Laurent and Jean Pierre!

Your tool saved me! Successfully deleted 51 GB!

(In my case I had to move to a different server and forgot so set the rights of the backup folder (a non-moodledatafolder on the same server), moodle couldn't access it and started adding backupfiles in filedir without deleting them...) 

here a short info to the script that I "learned" while using it:

-q (query; show the automated backupfiles )
-c (copy; copy files to location)
-d (directory)
-x (expunge; delete automated backupdfiles)

all files are deleted, which means they are send to trashdir (the timestamp of the last emptying of trashdir is set to the past), the next time cron is running tashdir is emptied.