We recommend using the pg_dump utility for backing up a PostgreSQL database. It makes consistent backups even if the database is being used concurrently. pg_dump does not block other users accessing the database (readers or writers). The most flexible output file formats is the directory format (-Fd). This format is compressed by default.