This is the main command-line program for manipulating EMAN2 BDB database files. Please read more about the BDB database itself.



This cleans up the database cache in /tmp safely. All EMAN2 programs must be exited before running this. After running this, database files can be safely removed, copied to another machine or accessed via NFS (until you access them again locally)



This will force an action that would normally fail due to failed checks.


This will delete (or at least empty) the specified database(s). Can be used with wildcards, etc.



List per-particle info from database containing stacks of images



Long listing



Dense listing in bdb:xxx format. Useful for using with 'for' loops in the shell.


Only include database names containing the specified string


Exclude database names containing the specified string


Only include dictionaries matching the provided Python regular expression. Make sure to quote the expression so the shell doesn't interpret it.


The name of a database containing a list of exclusion keys



List metadata contents of an entire database, eg e2bdb.py -D refine_01#register will list all of the parameters used during a refinement


Check for self-consistency and errors in the structure of specified databases


Creates a 'virtual' BDB stack with its own metadata, but the binary data taken from the (filtered) list of stacks. This permits multiple stacks to be combined into a single database without taking a lot of disk space


Appends to a 'virtual' BDB stack


Inputs an ASCII file with selected image to creates a new virtual BDB stack from an existing virtual stack


Write changed metadata in a virtual stack back to the original stack

The most important command, by far, is :

e2bdb.py -c 

which will clean up the database cache, generally stored in /tmp/eman2db-username, SAFELY. Removing this cache in any other way, including rebooting a machine set up to remove /tmp on reboot, runs the risk of data loss, or in some cases corruption. Before manually removing or renaming ANY database files, or accessing databases from another machine via NFS, you must run this program.

The next most common usage it to use e2bdb.py like the 'ls' command in Unix. That is, to list available databases in a particular path:

e2bdb.py <path>
e2bdb.py <path> -l

The --dump option allows you to see the actual metadata contents of a database. This is mainly designed for use with databases storing just metadata, not images, for example:

e2bdb.py bdb:.#project --dump     # will list the contents of the project database when run from an EMAN2 project directory
e2bdb.py bdb:refine_03#register     # Dumps the parameters used during a refinement run

EMAN2/Programs/e2bdb (last edited 2018-04-08 02:51:51 by TunayDurmaz)