maandag 22 februari 2021

pg_dump remote server tables

Je moet eerst even in pgpass.conf in %APPDATA% aanmaken.

Dus:
cd %APPDATA%
notepad pgpass.conf

Inhoud pgpass.conf

dnsentryname.local:5432:*:user:password
localhost:5432:*:postgres:password

Vervolgens:

pg_dump -h ipadres --column-inserts --data-only -t tablename -t othertablename --username=username --file=output.dmp --dbname=db -w

Geen opmerkingen:

Een reactie posten