The createdb.sh shellscript could do this for you (not all DB types are supported !) call
./createdb.sh POSTGRES DUMP