[ome-users] List expected files in omero data Files/ and omero scripts
Josh Moore
josh at glencoesoftware.com
Wed Sep 21 07:12:36 BST 2016
Hi Carnë,
On Wed, Sep 21, 2016 at 1:18 AM, Carnë Draug <carandraug+dev at gmail.com> wrote:
> On 19 September 2016 at 10:48, Josh Moore <josh at glencoesoftware.com> wrote:
>> Tag,
>>
>> On Wed, Sep 14, 2016 at 5:08 PM, Carnë Draug <carandraug+dev at gmail.com> wrote:
>>> On 14 September 2016 at 10:44, "Colin Blackburn"
>>
>> ...snip...
> I can handle this exception manually on our database. But scripts
> may not be the only issue. My problem is getting a list of all files
> that should be in Files/. This case with scripts was immediately
> obvious that I was doing something wrong but now I'm worried I may
> be doing something wrong for the other rows too. Do you think there
> could be any other exception? Any other case where files may have been
> removed as expected but remain in the database?
None that occur to me at the moment.
> That is, with the exception of this issue about old scripts, is this query
> suitable to get a complete list of all files that should be in Files/?
>
> SELECT
> id
> FROM originalfile
> WHERE (repo IS NULL OR repo = '') AND mimetype != 'Repository';
I think so. The only other special mimetype I know of is "Directory"
but it should only exist in the ManagedRepository.
> Or should I instead be getting the ids from all tables that reference
> originalfile(id)?
> Also, should I open a bug report about making a copy of the older scripts
> into Files/ ?
Certainly can't hurt. The value of fixing it largely depends on your
tool, so they may go hand-in-hand.
> For our current case, I could download the old releases
> of omero and copy the old version of the scripts into Files/. Could you
> see any issue with doing that?
Interesting. You could certainly give it a try. If the checksums
match, then I'd say it's completely valid to "re-fill" the /Files
location with a script. (That being said, there *still* may be gaps if
anyone edited the scripts in place, either by hand or via the API.) If
it works, then we could look into rolling that into an upcoming
upgrade.
> Thank you
> Carnë
All the best,
~Josh.
More information about the ome-users
mailing list