[ome-users] database cleaning

Ilya Goldberg igg at nih.gov
Wed Nov 9 14:15:00 GMT 2005


The best (i.e. cleanest) way to delete an image import is to delete  
the MEX for the "Original Files" module rather than "Image import"  
because its the Original Files that serves as the entry point.
Also, you want to delete a specific MEX rather than all MEXes for a  
given module (i.e. don't use the -m flag unless you're debugging a  
specific module).
The -n flag is a good thing to do first to make sure you don't delete  
more than you want.
It won't actually do anything unless you provide either the -n or -d  
flag, and -n is a read-only operation.

But the delete function is only there when you really need to do a  
surgical deletion.  Its not the most convenient mechanism when  
developing/debugging new code.

If you're debugging an importer, the easiest thing is to run the  
importer from the command line with the -r (reimport) flag:
ome import -d "testImport" -r myFile.foo

This will result in many images in the DB (if you have many bugs),  
but you can delete them all later, or just restore your DB from a  
backup.  Usually, its much easier and faster to work using a test DB,  
which you can make as messy as you can stand while debugging/ 
developing, and then just throw it away when you're done, and restore  
a previous version.  Its seldom necessary to swap-out/restore OMEIS,  
so the -q flag to "ome data backup/restore" is what you want to do.   
Anyway, that's the pattern we use during development rather than "ome  
data delete".
-Ilya


On Nov 8, 2005, at 3:03 PM, Bernd Jagla wrote:

>
> I guess something like this would work ( I didn't try it yet but it  
> looks
> like it will erasing a whole lot...).
>
> Ome data delete MEX -n/-d -m "Image import"
>
> -n is for showing off
> -d is for actual deletion.
>
> Best
>
> Bernd
>
> |-----Original Message-----
> |From: ome-users-bounces at lists.openmicroscopy.org.uk [mailto:ome- 
> users-
> |bounces at lists.openmicroscopy.org.uk] On Behalf Of Bernd Jagla
> |Sent: Tuesday, November 08, 2005 2:12 PM
> |To: ome-users at lists.openmicroscopy.org.uk
> |Subject: [ome-users] database cleaning
> |
> |Hello,
> |
> |
> |
> |During my attempts writing an importer I guess I messed up some of  
> the
> |database. How would reset the database or empty everything that was
> |imported at one point?
> |
> |
> |
> |Thanks
> |
> |
> |
> |Bernd
> |
> |
> |
> |
> |
> |Bernd Jagla, PhD
> |Associate Research Scientist
> |Columbia University
> |1150 St. Nicholas Avenue
> |Russ Berrie Medical Pavilion, Room 520
> |New York, NY 10032
> |Tel: 212 - 851 5560 x16
> |Fax: 212 - 851 5570
> |e-mail: baj2107 at columbia.edu
> |
> |
> |
>
>
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>




More information about the ome-users mailing list