Replication for mere mortals

25 views
Skip to first unread message

Florian Hector

unread,
Apr 22, 2026, 2:02:07 PM (11 days ago) Apr 22
to firebird...@googlegroups.com
Hi,

I need to make some databases from remote locations (accessible via rather slow VPN) available on a
local server. So far, this was done using a backup - transfer - restore cycle.
As the databases are growing and the local users demand more recent versions of the databases, I
started looking into replication.
For my purpose, asynchronous replication is sufficient.

I read through README.replication.md and replication.conf, but some questions remain:

In README.replication.md:

Minimal configuration looks like this:
database = /data/mydb.fdb
{
    journal\_directory = /journal/mydb/
    journal\_archive\_directory = /archive/mydb/
}

What is the line "journal\_archive\_directory = /archive/mydb/" for?
I can see that the journals from journal\_directory are moved to journal\_archive\_directory every
XXX seconds as defined with the journal\_archive\_timeout setting. Do I need to cache the journals
before moving them to the replica location?

Also, once the replica has imported the journals, are they deleted or somehow marked obsolete?

Any help much appreciated

Florian

Dmitry Yemanov

unread,
Apr 22, 2026, 3:24:50 PM (11 days ago) Apr 22
to firebird...@googlegroups.com
22.04.2026 21:02, Florian Hector wrote:
>
> I need to make some databases from remote locations (accessible via
> rather slow VPN) available on a local server. So far, this was done
> using a backup - transfer - restore cycle.
> As the databases are growing and the local users demand more recent
> versions of the databases, I started looking into replication.
> For my purpose, asynchronous replication is sufficient.
>
> I read through README.replication.md and replication.conf, but some
> questions remain:
>
> In README.replication.md:
>
> Minimal configuration looks like this:
> database = /data/mydb.fdb
> {
>     journal\_directory = /journal/mydb/
>     journal\_archive\_directory = /archive/mydb/
> }
>
> What is the line "journal\_archive\_directory = /archive/mydb/" for?

When the last journal file inside journal_directory is marked as
completed (or when the timeout expires), it's copied into
journal_archive_directory.

You should never touch files inside journal_directory, they're for
internal use. The files inside journal_archive_directory, however, are
intended for external use. Once copied there, Firebird does not care
about them anymore and you can use them whatever way you need - copy
elsewhere, rename, delete, etc.

> Also, once the replica has imported the journals, are they deleted or
> somehow marked obsolete?

Yes, they're deleted as soon as applied (although they may be preserved
for some time if they contain active transactions not yet committed in
the subsequent files). You may enable the verbose_logging setting on the
replica side to see how journal files are being processed (see
replication.log for details).


Dmitry

Reply all
Reply to author
Forward
0 new messages