moodle-tool_objectfs icon indicating copy to clipboard operation
moodle-tool_objectfs copied to clipboard

Objects are not removed from local even when enabled "Delete local objects"

Open prabhakaran8737 opened this issue 4 years ago • 10 comments

In my case I am using Amazon s3 as external object and files are synced after running cron job. Now it is bit confusing whether files are from local or external object. I have enabled Delete local objects but still the size before sync and after sync are same.

Here is my object report

Object-status

prabhakaran8737 avatar Nov 14 '21 03:11 prabhakaran8737

I would only expect 14mb to be locally. It will take some time for the local files to cleanup and be removed (it isn't instant)

kisonay avatar Nov 14 '21 15:11 kisonay

@kisonay Problem exists since yesterday. You know how to cross check? Also in above screenshot "Only in External storage" is 0 still.

prabhakaran8737 avatar Nov 14 '21 15:11 prabhakaran8737

I would only expect 14mb to be locally. It will take some time for the local files to cleanup and be removed (it isn't instant)

May I know the settings for this to happen?

prabhakaran8737 avatar Nov 14 '21 16:11 prabhakaran8737

I would only expect 14mb to be locally. It will take some time for the local files to cleanup and be removed (it isn't instant)

If not instant is this related to CRON job timing which we schedule?

prabhakaran8737 avatar Nov 16 '21 09:11 prabhakaran8737

Have you regenerated a report?

The report is created by a nightly task \tool_objectfs\task\generate_status_report

So while change may have occured you don't have an up to date report

aspark21 avatar Nov 16 '21 22:11 aspark21

@aspark21 thank you for the response. Yes I have regenerated. This is my recent report, If you see Only in External storage is still 0 Screenshot 2021-11-17 at 7 24 55 AM

prabhakaran8737 avatar Nov 17 '21 01:11 prabhakaran8737

are you running cron on your site correctly? - or are you manually triggering events/cron when needed? This plugin requires multiple cron tasks to run multiple times overnight and with larger sites the process can take some time (days/weeks) as it tries to be kind to the API's and doesn't do everything all at once but slowly migrates the content and deletes the local data when ready.

danmarsden avatar Nov 17 '21 02:11 danmarsden

@danmarsden I have few questions

  1. Only after migrating everything, local data will be deleted?
  2. In my server data directory is 148GB and in Amazon s3 also size is 148.1GB, So I assume everything is transferred.

This is my cronjob schedular in server, running for the past 3 days.

* * * * * /opt/cpanel/ea-php74/root/usr/bin/php /to/public_html/admin/cli/cron.php > /dev/null 2>&1

And in application Screenshot 2021-11-17 at 7 56 09 AM

prabhakaran8737 avatar Nov 17 '21 02:11 prabhakaran8737

@danmarsden still files are removed from my the server. Cron are running regularly

prabhakaran8737 avatar Dec 06 '21 08:12 prabhakaran8737

not sure what else I can suggest sorry - it works for us - and we have this running in a massive number of sites...

danmarsden avatar Dec 06 '21 08:12 danmarsden