Fix metadatabase, do not delete history files.