Export Tables to CSV psql -c "\copy (SELECT * FROM account) to '/tmp/account.csv' with csv;" References How to export all tables in a PostgreSQL database to csv files?