Backup
- 导出
COPY ... TO STDOUT WITH CSV HEADER \g export.scv
\copy (select 1 as val) TO 'test.csv' WITH CSV HEADER
- 参考
# -Z compress
pg_dump -Fc -Z 9 -j $(nproc) --file=file.dump myDb
pg_restore -Fc -j $(nproc) file.dump
COPY ... TO STDOUT WITH CSV HEADER \g export.scv
\copy (select 1 as val) TO 'test.csv' WITH CSV HEADER
# -Z compress
pg_dump -Fc -Z 9 -j $(nproc) --file=file.dump myDb
pg_restore -Fc -j $(nproc) file.dump