doiphode / moodle-tool_clearbackupfiles

Admin tool to clear all backup files from server.
GNU General Public License v3.0
2 stars 3 forks source link

All newly added backups are deleted immediately #10

Closed christianabila closed 1 month ago

christianabila commented 1 month ago

https://github.com/doiphode/moodle-tool_clearbackupfiles/blob/e521f796e665fc60d9c631b7b18de859d0577c78/classes/task/cron_task.php#L48

This change immediately clears any backups made, making it basically impossible to download the files beforehand. It also makes plugins like block_sharing_cart unusable.

What's the exact purpose of this change?

Best regards, Chris

doiphode commented 1 month ago

Thank you for raising this Christian.

Can I check what number of days you are giving. I can test as per your setting.

christianabila commented 1 month ago

Hi!

It's the default value (5).

Best regards, Chris

doiphode commented 1 month ago

Hi Chris,

Can you please try the updated code and let me know?

Thank you for your time on this.

Kind regards

christianabila commented 1 month ago

Hi again!

That change should do the trick 😉

christianabila commented 1 month ago

One more thing: perhaps have the scheduled task disabled by default. It could be fatal to have all older backups deleted right after the plugin installation/update, without any consent.

doiphode commented 1 month ago

I have further updated the plugin. Thanks.

doiphode commented 1 month ago

Closing this, as the update is added.

Thanks as always!