pg_basebackup – experiences

pg_basebackup version <10 does not allow streaming of WAL files during tar files so it is technically useful mainly for cloning of the database for replication. To use it for backups it is necessary to use it with pg-barman. pg_basebackp version 10+ has this...

pg_dump & pg_restore

Here are some often used variants of these commands: pg_dump: dump the whole database (custom format): pg_dump --username "user_name" --no-password&nbsp; --format custom --verbose --file "file_name.backup" "database_name" dump only...

Export data into CSV format

Command “COPY” will do all the dirty job.   Attention – examples are ment for Linux and contain variables which you have to set or substitute with values.   If data are small you will probably use directly unpacked form: psql -U postgres -d...