Page 1 of 1

Binary Repository - Files not cleaned up on delete

PostPosted: Mon Sep 28, 2009 7:47 pm
by belanna11
I just confirmed that when a user deletes an image using OMERO Insight, the files in the binary repository related to that image are not deleted from the binary repository. This should be noted somewhere in the binary repository documentation, as this has ramifications for storage planning. We may institute a clean-up manually using scripts for files in the binary repository that no longer have records in the database. The tables in the database that are linked to the files are (please correct me if I am wrong):
1. Image table holds the ID associated with the Pixels table.
2. Pixels table has the ID and image fields that *usually* match the filename in the Pixels repository, assuming a 1-1 file to pixels record.
3. Originalfile table has ID associated with the filename in the Files repository.
4. Pixelsoriginalfilemap holds the association between Pixels ID (child field) and original file ID (parent field).
5. Thumbnail table holds the ID associated with the thumbnail filename in the Thumbnails repository.

So it should be simple to create a script that, for example, removes files in the Files repository that no longer exist in the Originalfile table.

Does this make sense?

Re: Binary Repository - Files not cleaned up on delete

PostPosted: Wed Sep 30, 2009 2:44 am
by cxallan
The intention was to have these files deleted, unfortunately there's a bug in the server that's preventing this from happening. We have some tools that will be included with OMERO Beta 4.1 to handle this issue without users having to roll their own scripts to do so.

I'll keep you posted when these tools make it in to Trunk so that you can use them with your 4.0.3 instance.

Re: Binary Repository - Files not cleaned up on delete

PostPosted: Thu Oct 01, 2009 12:52 pm
by cxallan
You can now track status on the reconciliation script and other tools on this ticket:

http://trac.openmicroscopy.org.uk/omero/ticket/1504

We'll be backporting this for those who still wish to run 4.0.x as soon as possible.