postgres backup database pg_dump linux code example Example: how to backup postgresql database using pg_dump pg_dump dbname > outfile