2012-08-02 91 views
1

我正在使用Bucardo复制数据库中的数据。我有一个名为mydb的数据库,另一个名为mydb2。它们都包含相同的表格,在这两种情况下都称为“数据”。继this website的步骤,我已经安装Bucardo这并增加了两个数据库:Bucardo添加同步以复制数据

bucardo_ctl add database mydb 
bucardo_ctl add database mydb2 

,并添加表:

bucardo_ctl add all tables 

现在,当我尝试使用以下命令来添加同步:

bucardo_ctl add sync testfc source=mydb targetdb=mydb2 type=pushdelta tables=data 

我得到以下错误:

DBD :: PG :: ST前ecute失败:错误:来自Perl函数“herdcheck”的错误:无法在第17行中的同一群(1)中的不同山羊中找到山羊。在/ usr/bin/bucardo_ctl行3346处。

任何人有任何建议吗?任何将不胜感激。

回答

2

因此,在源选项,你应该把牛群(其中,因为我知道,表的列表的名称 然后,而不是:

bucardo_ctl add all tables 

使用

bucardo_ctl add all tables --herd=foobar 

而是采用

bucardo_ctl add sync testfc source=mydb targetdb=mydb2 type=pushdelta tables=data

U和se

bucardo_ctl add sync testfc source=foobar targetdb=mydb2 type=pushdelta tables=data 

事情是,源选项不是放置源数据库的地方,而是“放牧”或表。

请记住,pushdelta是用于具有主键的表格,而fullcopy是用于无关紧要的表格是否具有PK。

希望有所帮助。

相关问题