General developer forum

Recycle Bin Migration Files

 
Picture of Raad Al-Rawi
Recycle Bin Migration Files
 

Hi All


We recently upgraded our production instance from 3.0 to 3.2, and having previously installed the Kent Uni recyclebin plugin, we went through the upgrade process to move all the content over to the core version of the plugin. That process copies the content into the new plugin, rather than moves it, so we are left with a "moodledata/recyclebin" subdirectory with a bunch of files in it.

Naturally we want to remove these, as they are simply taking up space, so my question is: does anyone know if removing these files will have an effect on Moodle, and if so, what effect might that be?


Thanks


Raad

 
Average of ratings: -
Picture of Ken Task
Re: Recycle Bin Migration Files
Group Particularly helpful Moodlers

Go to:

yourserver/admin/settings.php?section=tool_recyclebin

Default retention period before moving to trashdir is 1 week.

To rid more quickly, set to 'weeks' to whatever time period more frequent than week.

Save settings.

There is a task for cleaning up the category/course recycle bins.  By default, they run every 30 minutes (I think).

Check that setting.   Set more freqently?

Then run cron.

Might want to reset settings you changed back to whatever you prefer (that makes sense and is sane) after files are finally gone.

'spirit of sharing', Ken


 
Average of ratings: -
Picture of Raad Al-Rawi
Re: Recycle Bin Migration Files
 

Hi Ken


Thanks for your reply - apologies as I may not have been as clear as I should have been.

What we are looking to clear are the leftover files from the recycle bin migration process that needs to be performed if your Moodle is < 3.1 (and you have the local recycle bin plugin installed), and you upgrade to >= 3.1 and want to adopt the core recycle bin.

After the migration, you are left with all the files from the local/recyclebin plugin in moodledata/recyclebin and I wanted to check if deleting these was safe.


Cheers


Raad

 
Average of ratings: -
Picture of Ken Task
Re: Recycle Bin Migration Files
Group Particularly helpful Moodlers

Didn't understand ...  thanks for clarification.   Qualifications for this response ... havent ever run the other (prior to core) recyclebin plugin, but ... if it has been removed from the system after the files have been migrated to moodledata would assume that they are no longer needed.

So that plugin put files in moodlecode/local/recyclebin/ some where?

To find out if things would go wonkie, think I'd backup (make a tar ball of that local/recyclebin/files if it's still there to a location outside moodle (code or data).   Then remove knowing I have an archive of it and can put it back should something strange happen.

Were the files in /local/recyclebin/ by contenthash names ... bunch of letters and numbers with no file name extension?    IF so, one could use that contenthash file name in a search of moodledata/filedir/ and moodledata/trashdir/ files.

Like:

[root@sos moodle33data]# find ./filedir/ -name b250e36063bcc0af55a0349d6142bae1ea3a3b73

If find shows nothing and the old recyclebin plugin and tables are gone from Moodle would assume moodle can't see that file let alone use it.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Raad Al-Rawi
Re: Recycle Bin Migration Files
 

Thanks Ken


The "old" recycle bin files don't use a content-hash naming system, but something specific to the plugin.

We'll probably use our Test instance and check out the effect of moving the files elsewhere. I'll try and keep this thread updated with the results so that anyone else with the same query can find the information.


Cheers


Raad

 
Average of ratings: -