laiye 发表于 2008-7-25 15:09:00

数据库备份的问题~

问:我已经把数据库备份成功了,但是在备份回存的时候出错.
Command was: CREATE VIEW userinfo AS
SELECT DISTINCT ((a.id)::text || (pp.id)::text) AS userinfo_id, ra.account_id, a.name, pp.projec...
pg_restore: restoring data for table "account"
pg_restore: ERROR: duplicate key violates unique constraint "account_pkey"
CONTEXT: COPY account, line 1: "demo demo 96e79218965eb72c92a549dd5a330112 1 0 1 1"
pg_restore: error returned by PQendcopy: ERROR: duplicate key violates unique constraint "account_pkey"
CONTEXT: COPY account, line 1: "demo demo 96e79218965eb72c92a549dd5a330112 1 0 1 1"
pg_restore: *** aborted because of error

不知道是什么原因.

我现在要把一台机器上的数据库移植到另一台机器.

答:您是按照备份方法http://magicflu.com/showtopic-906.aspx备份的吗?请先试试新的系统是否好用,数据是否恢复回去了。
问:我打开pgadmin后里面已经有一个服务了,不需要重新建立,我就直接备份了,但备份回归的时候总出错~
答:在需要恢复数据的新系统上,用pgadmin先把pwbim2007数据库删掉,然后新建一同名数据库,然后再恢复试试
问:数据库删掉,然后新建一同名数据库,然后再恢复
可以备份了,谢谢

admin 发表于 2012-7-16 09:04:28

顶贴

yjw 发表于 2012-8-6 13:02:09

了解下                  
页: [1]
查看完整版本: 数据库备份的问题~