data dump local postgres database on my local machine code example Example: how to take database dump in postgresql pg_dump dbname > outfile