[Bucardo-general] Syncing multiple databases on the same server
Rafik Rezzik
rafik.rezzik at gmail.com
Wed Jul 18 17:23:58 UTC 2012
Hi all,
I'm problems getting two syncs working. I have two databases on my servers
I want to sync. I add both dbs and their tables into separate herds and
then add a sync, but it fails. Quickly looking through the log, it looks
like there is a check happening where tables from one of the dbs are being
looked for in the other db. Not surprisingly an error is logged telling a
table is not on the database.
9058) [Wed Jul 18 17:04:52 2012] MCP Connecting to database "iabase_ubc"
(target)
85 (9058) [Wed Jul 18 17:04:52 2012] MCP DB "iabase_ubc" Local epoch:
1342631092.48953 DB epoch: 1342631092.49 259
86 (9058) [Wed Jul 18 17:04:52 2012] MCP DB "iabase_ubc" Local time: Wed
Jul 18 17:04:52 2012 DB time: 2012-07 -18 13:04:52.492587-04
87 (9058) [Wed Jul 18 17:04:52 2012] MCP DB "iabase_ubc" Local timezone:
UTC (+0000) DB timezone: US/Eastern
88 (9058) [Wed Jul 18 17:04:52 2012] MCP DB "iabase_ubc" Postgres version:
80412
89 (9058) [Wed Jul 18 17:04:52 2012] MCP DB "iabase_ubc" Database port:
5432
90 (9058) [Wed Jul 18 17:05:18 2012] MCP Inspecting source table
"public.eastern_box" on database "iabase_o1"
91 (9058) [Wed Jul 18 17:05:18 2012] MCP Inspecting target table
"public.eastern_box" on database "geoloc_ub c"
92 (9058) [Wed Jul 18 17:05:18 2012] MCP Warning: Killed (line 5896):
DBD::Pg::st execute failed: ERROR: relat ion "public.eastern_box" does
not exist at /usr/local/share/perl5/Bucardo.pm line 5896.
93 (9058) [Wed Jul 18 17:05:20 2012] MCP End of cleanup_mcp. Sys time: Wed
Jul 18 17:05:20 2012. Database time: 2012-07-18 17:05:20.349254+00
iabase_ubc and ia_base_o1 are different dbs and their tables are in
seperate herds. Anyone have any idea why this is happening and how to fix
it? Below are the bucardo commands I've issued to get to my current setup.
Sorry for the long text but it might provide more clarity. I am using
4.99.5. Thanks in advance.
Cheers,
Rafik
Adding dbs
========
bucardo add db iabase_o1 dbname="IA_Base" host=postgres-o1 dbuser=###
dbpass='###'
bucardo add db iabase_s1 dbname="IA_Base" host=postgres-s1 dbuser=bucardo
dbpass='###'
bucardo add db iabase_ubc dbname="IA_Base" host=### dbuser=bucardo
dbpass='###'
Adding db group and tables
====================
bucardo add dbgroup iabase_all iabase_o1:source iabase_s1:source
iabase_ubc:target
bucardo add all tables db=iabase_o1 herd=iabase_herd
Adding sync
==========
bucardo add sync iabase_sync herd=iabase_herd dbs=iabase_all
Status
====
bash-4.1# bucardo status
PID of Bucardo MCP: 8828
Name State Last good Time Last I/D Last bad
Time
=============+========+============+=========+===========+===========+=======
iabase_sync | Good | 16:47:08 | 12m 14s | 0/2 | none
|
Adding dbs
========
bucardo add db geoloc_o1 dbname=geolocation host=postgres-o1 dbuser=###
dbpass='###'
bucardo add db geoloc_s1 dbname=geolocation host=postgres-s1 dbuser=###
dbpass='###'
bucardo add db geoloc_ubc dbname=geolocation host=## dbuser=### dbpass='###'
Adding dbgroup and tables
===================
bucardo add dbgroup geoloc_all geoloc_o1:source geoloc_s1:source
geoloc_ubc:target
bucardo add all tables db=geoloc_o1 herd=geoloc_herd
Adding sync
=========
bucardo add sync geoloc_sync herd=geoloc_herd dbs=geoloc_all
Status
======
bash-4.1# bucardo status
PID of Bucardo MCP: 9058
Name State Last good Time Last I/D Last
bad Time
=============+==================+============+=========+===========+===========+=======
geoloc_sync | No records found | | |
| |
iabase_sync | Good | 16:47:08 | 17m 41s | 0/2 |
none |
List tables
========
bash-4.1# bucardo list tables
22. Table: public.blocks DB: geoloc_o1 PK: startipnum
(int8)
Syncs: geoloc_sync
1. Table: public.eastern_box DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
2. Table: public.geometry_columns DB: iabase_o1 PK:
f_table_catalog|f_table_schema|f_table_name|f_geometry_column
(varchar|varchar|varchar|varchar) Syncs: iabase_sync
3. Table: public.ia_calib DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
4. Table: public.ia_contacts DB: iabase_o1 PK: cont_no
(int4)
Syncs: iabase_sync
5. Table: public.ia_instrument DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
6. Table: public.ia_sites DB: iabase_o1 PK: site_no
(int4)
Syncs: iabase_sync
7. Table: public.ia_sites2contacts DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
8. Table: public.ia_status DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
9. Table: public.ia_triggers DB: iabase_o1 PK:
ca_seed_id|utc_stamp
(varchar|timestamp)
Syncs: iabase_sync
23. Table: public.locations DB: geoloc_o1 PK: locid
(int4)
Syncs: geoloc_sync
10. Table: public.mot_sites DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
11. Table: public.pga_diagrams DB: iabase_o1 PK: diagramname
(varchar)
Syncs: iabase_sync
12. Table: public.pga_forms DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
13. Table: public.pga_graphs DB: iabase_o1 PK: graphname
(varchar)
Syncs: iabase_sync
14. Table: public.pga_images DB: iabase_o1 PK: imagename
(varchar)
Syncs: iabase_sync
15. Table: public.pga_layout DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
16. Table: public.pga_queries DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
17. Table: public.pga_reports DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
18. Table: public.pga_schema DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
19. Table: public.pga_scripts DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
20. Table: public.spatial_ref_sys DB: iabase_o1 PK: srid
(int4)
Syncs: iabase_sync
21. Table: public.sw_bc_box DB: iabase_o1 PK: id
(int4)
Syncs: iabase_sync
List herds
=======
bash-4.1# bucardo list herd
Herd: geoloc_herd DB: geoloc_o1 Members: public.blocks, public.locations
Used in syncs: geoloc_sync
Herd: iabase_herd DB: iabase_o1 Members: public.eastern_box,
public.geometry_columns, public.ia_calib, public.ia_contacts,
public.ia_instrument, public.ia_sites, public.ia_sites2contacts,
public.ia_status, public.ia_triggers, public.mot_sites,
public.pga_diagrams, public.pga_forms, public.pga_graphs,
public.pga_images, public.pga_layout, public.pga_queries,
public.pga_reports, public.pga_schema, public.pga_scripts,
public.spatial_ref_sys, public.sw_bc_box
Used in syncs: iabase_sync
List syncs
========
bash-4.1# bucardo list sync
Sync: geoloc_sync Herd: geoloc_herd [Active]
DB group geoloc_all: geoloc_o1 (source) geoloc_s1 (source) geoloc_ubc
(target)
Sync: iabase_sync Herd: iabase_herd [Active]
DB group iabase_all: iabase_o1 (source) iabase_s1 (source) iabase_ubc
(target)
Tail of log.bucardo
==============
9058) [Wed Jul 18 17:04:52 2012] MCP Connecting to database "iabase_ubc"
(target)
(9058) [Wed Jul 18 17:04:52 2012] MCP DB "iabase_ubc" Local epoch:
1342631092.48953 DB epoch: 1342631092.49259
(9058) [Wed Jul 18 17:04:52 2012] MCP DB "iabase_ubc" Local time: Wed Jul
18 17:04:52 2012 DB time: 2012-07-18 13:04:52.492587-04
(9058) [Wed Jul 18 17:04:52 2012] MCP DB "iabase_ubc" Local timezone: UTC
(+0000) DB timezone: US/Eastern
(9058) [Wed Jul 18 17:04:52 2012] MCP DB "iabase_ubc" Postgres version:
80412
(9058) [Wed Jul 18 17:04:52 2012] MCP DB "iabase_ubc" Database port: 5432
(9058) [Wed Jul 18 17:05:18 2012] MCP Inspecting source table
"public.eastern_box" on database "iabase_o1"
(9058) [Wed Jul 18 17:05:18 2012] MCP Inspecting target table
"public.eastern_box" on database "geoloc_ubc"
(9058) [Wed Jul 18 17:05:18 2012] MCP Warning: Killed (line 5896):
DBD::Pg::st execute failed: ERROR: relation "public.eastern_box" does not
exist at /usr/local/share/perl5/Bucardo.pm line 5896.
(9058) [Wed Jul 18 17:05:20 2012] MCP End of cleanup_mcp. Sys time: Wed Jul
18 17:05:20 2012. Database time: 2012-07-18 17:05:20.349254+00
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20120718/aba47401/attachment.html>
More information about the Bucardo-general
mailing list