e2bdb.py

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

-c

--cleanup

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)

-F

--force

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

--delete

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

-a

--all

List per-particle info from database containing stacks of images

-l

--long

Long listing

-s

--short

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

--filt=<string>

Only include database names containing the specified string

--filtexclude=<string>

Exclude database names containing the specified string

--match=<regex>

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

--exclude=<dbpath>

The name of a database containing a list of exclusion keys

-D

--dump

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

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

--makevstack=<vstackpath>

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

--appendvstack=<vstackpath>

Appends to a 'virtual' BDB stack

--list=<file>

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

--restore=<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
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)