Refactor: new PMA_exportDatabase()

Signed-off-by: Marc Delisle <marc@infomarc.info>