使用pg_dump指令的時候要加上參數"-Fc"
sudo -u postgres pg_dump -Fc MusicSpirit > MusicSpirit_bak
sudo -u postgres pg_dump -Fc myServletDB > myServletDB_bak
sudo -u postgres pg_dump -Fc postgistemplate > postgistemplate_bak
之後再用以下指令將資料灌到1.5版的資料庫
sudo -u postgres sh /usr/share/postgresql-8.4-postgis/utils/postgis_restore.pl /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql MusicSpirit MusicSpirit_bak -E=UNICODE > restore.log
sudo -u postgres sh /usr/share/postgresql-8.4-postgis/utils/postgis_restore.pl /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql myServletDB myServletDB_bak -E=UNICODE > restore.log
sudo -u postgres sh /usr/share/postgresql-8.4-postgis/utils/postgis_restore.pl /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql postgistemplate postgistemplate_bak -E=UNICODE > restore.log