备份

pg_dump -h 192.168.1.1 -p 5431 -U postgres -d adcode > adcode.sql

恢复

createdb -U postgres -h 192.168.1.1 -p 5431 adcode
psql -U postgres -h 192.168.1.1 -p 5431 adcode
    CREATE EXTENSION postgis;
psql -U postgres -h 192.168.1.1 -p 5431 -W adcode < adcode.sql