script for exporting db