- 将文件备份还原
C:\Program Files\PostgreSQL\9.0\bin>pg_dump -U postgres -h localhost -p 5432 tlcdata> output_file.sql
C:\Program Files\PostgreSQL\16\bin>psql -U postgres -h localhost -p 5432 -d tlcdata -f output_file.sql - 包含角色 -C
C:\Program Files\PostgreSQL\9.0\bin>pg_dump -U postgres -h localhost -p 5432 -C tlcdata > output_file1.sql
C:\Program Files\PostgreSQL\16\bin>psql -U postgres -h localhost -p 5432 -d tlcdata -f output_file1.sql - 整个集
C:\Program Files\PostgreSQL\9.0\bin>pg_dumpall -U postgres -h localhost -p 5432 -f cluster_dump.sql C:\Program Files\PostgreSQL\16\bin>psql -U postgres -h localhost -p 5432 -f cluster_dump.sql