Delete old backup files?

Re: Delete old backup files?

by Ken Task -
Number of replies: 0
Picture of Particularly helpful Moodlers

Boy I wish! :|

When in private files, only by logging in as that Teacher can admin level actually see them - thus be able to delete via Admin UI.

Query

select contenthash,filearea,filename,filesize from `mdl_files` where (`filearea` like "backup" and `filename` like "%.mbz%") order by filesize DESC

Then manually remove the file in moodledata/filedir/contenthashdirs/contenthash/

and of course the row in DB mdl_files that referenced it.

Moosh does have a command: http://moosh-online.com/commands/

Example 4: Remove all automated backups and reclaim the space

moosh file-list -i 'component="backup" AND filearea="automated"' | moosh file-delete -s
moosh file-delete --flush

'spirit of sharing', Ken

Average of ratings: Useful (3)