winkey4986

备份

pg_dump.exe -c -b -E UTF8 -U postgres -h 127.0.0.1 -p 5432 -f "f:\testdb001.bak" testdb001

还原

psql.exe -h 127.0.0.1 -U postgres -d testdb001 -E -f "f:\testdb001.bak"

 

--Linux
pg_dump -U postgres -c -C --if-exists -d cmsss -f F:/cmsss.sql

 

SQL备份

pg_dumpall.exe -h localhost -p 5432 -U postgres -v -f C:\All.sql 2> C:\All.log

SQL还原

psql.exe -h localhost -p 5432 -U postgres -f C:\All.sql

分类:

技术点:

相关文章: