We'd like to be able to support SQL dumps alongside our CSV dumps, to do this we need a script (preferably Python, but bash works too) that can connect to a postgres database and output a .sql dump.