Page 1 of 1

คำสั่ง backup / restore ใน format sql output

Posted: 07 Sep 2016, 19:10
by admin
backup

Code: Select all

pg_dump db_name | gzip > file.gz
restore

Code: Select all

cat file.gz | gunzip | psql db_name

Re: คำสั่ง backup / restore ใน format sql output

Posted: 22 Oct 2024, 22:47
by brid.surapol

Code: Select all

cat file.gz | gunzip | psql -p #port_number# -U #db_user# -d #database_name#