1. 修改role密碼
alter role postgres password 'postgres';
2. 設置postgres遠程連接
1). 修改listen addresses
sudo vim /etc/postgresql/8.3/main/pg_hba.conf
# listen_addresses = 'localhost'
設置為 listen_addresses = '*'
2). 添加ip
sudo vim /etc/postgresql/8.3/main/postgresql.conf
在 最后一行添加
host all all 192.168.0.0/16 md5
3.數據庫備份
pg_dump -h 192.168.4.217 --username admin RestaurantCenter >restaurantcenter1.sql
4. 恢復備份
psql -h 192.168.1.18 --username postgres RestaurantCenter < restaurantcenter1.sql
posted on 2009-07-31 14:23
冰是沒有未來的,因為它的永恒 閱讀(189)
評論(0) 編輯 收藏 所屬分類:
postges database