Question on replication in FB4

23 views
Skip to first unread message

zora...@gmail.com

unread,
Jun 3, 2021, 1:12:58 PMJun 3
to firebird...@googlegroups.com

Hello

 

I am trying to test replication feature in FB 4 and I am doing something wrong. Probably I don’t understand the concept.

 

  1. Do I have to have 2 servers running on the same machine or one server is enough?
  2. If it must be 2 servers, do they have to be on different machines on the network?

 

Right now I have 1 server (SuperServer) running on my laptop. I ran ALTER DATABASE ENABLE PUBLICATION and ALTER DATABASE INCLUDE ALL TO PUBLICATION against my Master (test) database. I am trying to do async replication.

 

Master_Repl.FDB is exact copy (in different folder) of my Master.FDB.

 

I have this in replication.conf file

 

#

# Database-specific settings belong here, e.g.

#

# (for the primary side)

#

database = C:\Database\Master\Master.FDB

{

#   (for synchronous replication)

#

#   sync_replica = sync_replica = sysdba:masterkey@otherhost:/your/replica.fdb

#

#   (for asynchronous replication)

#

  journal_directory = C:\Database\Master\journal

  journal_archive_directory = C:\Database\Master\archive

  journal_archive_timeout = 10

}

#

# (for the replica side)

#

database = C:\Database\Replica\Master_Repl.FDB

{

  journal_source_directory = C:\Database\Master\ journal

}

 

I see some files in journal and archive folders, but when I update Master.FDB nothing changes in Master_Repl.FDB

 

I’ve read README_replication.md and instructions in replication.conf, but, evidently, I’m doing something wrong…

 

Can someone point me in the right direction, pls?

 

Regards

Zoran

Dmitry Yemanov

unread,
Jun 3, 2021, 1:20:50 PMJun 3
to firebird...@googlegroups.com
03.06.2021 20:12, zora...@gmail.com wrote:
>
> I am trying to test replication feature in FB 4 and I am doing something
> wrong. Probably I don’t understand the concept.
>
> 1. Do I have to have 2 servers running on the same machine or one
> server is enough?

One is enough.

> 2. If it must be 2 servers, do they have to be on different machines on
> the network?

No, they can reside on a single host.

>   journal_source_directory = C:\Database\Master\ journal

It should point to "C:\Database\Master\archive"


Dmitry

zora...@gmail.com

unread,
Jun 3, 2021, 2:07:25 PMJun 3
to firebird...@googlegroups.com
Hi Dmitry

Thank you for the answer.

Now I get an error in replication.log:

DESKTOP-9IE0VV6 (replica) Thu Jun 3 14:04:06 2021
Database: C:\DATABASE\REPLICA\MASTER_REPL.FDB
ERROR: invalid replicator handle

This is from replication.conf

#
# (for the replica side)
#
database = C:\Database\Replica\Master_Repl.FDB
{
journal_source_directory = C:\Database\Master\archive\
}

Regards
Zoran
--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/b551734d-5236-cd68-8e9e-ad42e2918f84%40yandex.ru.

zora...@gmail.com

unread,
Jun 3, 2021, 2:30:59 PMJun 3
to firebird...@googlegroups.com
Hi Dmitry

All ok now. I didn't set replica database to read-only with gfix ☹

Thank you again !

Regards
Zoran


-----Original Message-----
From: zora...@gmail.com <zora...@gmail.com>
Sent: Thursday, June 3, 2021 2:07 PM
To: 'firebird...@googlegroups.com' <firebird...@googlegroups.com>
Subject: RE: [firebird-support] Question on replication in FB4

Hi Dmitry

Thank you for the answer.

Now I get an error in replication.log:

DESKTOP-9IE0VV6 (replica) Thu Jun 3 14:04:06 2021
Database: C:\DATABASE\REPLICA\MASTER_REPL.FDB
ERROR: invalid replicator handle

This is from replication.conf

#
# (for the replica side)
#
database = C:\Database\Replica\Master_Repl.FDB
{
journal_source_directory = C:\Database\Master\archive\ }

Regards
Zoran




-----Original Message-----
From: firebird...@googlegroups.com <firebird...@googlegroups.com> On Behalf Of Dmitry Yemanov
Sent: Thursday, June 3, 2021 1:21 PM
To: firebird...@googlegroups.com
Subject: Re: [firebird-support] Question on replication in FB4

Reply all
Reply to author
Forward
0 new messages