support for db cleanup and recover