Clear Backup Files

Administration tool ::: tool_clearbackupfiles
Maintained by Shubhendra Doiphode
Course backups can be an expensive task at times. It could take loads of unnecessary space and memory on the server. Administrators can clear backup files on the server to free the server space.
Latest release:
579 sites
20 fans
Current versions available: 2

package: tool_clearbackupfiles

This admin tool clears all backup files from the server. It is useful for freeing up space from dev and test servers once they are refreshed from production.

It also gives a report og how many mbz files were deleting clearing how much space.


the backup files can be deleted from /admin/tool/clearbackupfiles/index.php and you can find logs at /report/log/index.php. The default moodle events is used to create log entry.

The plugin also has a setting to enter number of days and associated scheduled task to do the cleanup automatically.


Screenshot #0


Shubhendra Doiphode (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

བསམ་བཀོད་ཚུ་ སྟོན
  • Plugins bot
    ལྷག་, 11 ༢ 2020, 10:20 PM
    Approval issue created: CONTRIB-7984
  • Pavel Lomov
    ལྷག་, 12 ༡༠ 2021, 11:48 PM
    I get cli - error when start index.php :

    root@moodle:/etc# php -f /srv/www/htdocs/moodle/admin/tool/clearbackupfiles/index.php
    Command line scripts must define CLI_SCRIPT before requiring config.php

    moodle 3.6.5
  • Rodrigo Ribeiro
    མིར་, 5 12 2022, 10:45 PM
    I did the cleaning through the web admin but it didn't release the space informed, even after running cron.
  • Nora Colazzo
    ལྷག་, 6 12 2022, 6:18 AM
    I'm just wondering if there have been any changes to this plugin so it works without the issues raised on this page?
  • Shubhendra Doiphode
    ལྷག་, 6 12 2022, 6:32 AM
    There has been no update to this plugin recently.

    Let me test this and address the above concerns.
  • Shubhendra Doiphode
    ཕུར་, 7 12 2022, 7:44 AM
    I have added CLI_SCRIPT in index.php.
  • Shubhendra Doiphode
    ཕུར་, 7 12 2022, 5:23 PM
    The other issue reported by Rodrigo should be resolved.

    I would suggest to create a issue on the repository for any future bugs.

  • Pia Liersch
    སངས་, 23 ༥ 2024, 5:28 PM
    Interesting Plugin.
    But i missed some Features.
    * remove only Backups ago xxx Days (specified on settings page)
    * scheduled task
  • Shubhendra Doiphode
    མིར་, 10 ༦ 2024, 5:22 AM
    Hi Pia,

    Thank you for the suggestions.

    I have added the requested features in the updated version.

Please login to post comments