25.02.2021 09:27, Peter Gore wrote:
Your suggestion still did not work. What _does _seem to work is if I
make log_source_directory = log_directory (NOT log_archive_directory as
advised). *Please comment*.
This is wrong.
I am getting errors however in the replication log
TOSHPJG (replica) Thu Feb 25 06:11:39 2021
Database: D:\USERS\PETER\DOCUMENTS\FB4DATA\FB4TESTREPLICA.FDB
VERBOSE: Segment 23 (1923 bytes) is replicated in 30 ms, deleting the file
TOSHPJG (replica) Thu Feb 25 06:11:39 2021
Database: D:\USERS\PETER\DOCUMENTS\FB4DATA\FB4TESTREPLICA.FDB
ERROR: Log file D:\Apps\FB4\FB4Test\chlog\FB4TEST.FDB.chlog-000000023
unlink failed (error: 32)
*Why is this*?
Because nobody should access these files except the primary FB instance.
Currently you have the replication screwed up, so I'd suggest starting
from scratch:
1) stop all FB instances
2) remove all files from log_directory, log_archive_directory and
log_source_directory, remove the replica database, remove
replication.log on both sides
3) copy the primary database, run gfix -replica on the copy
4) start all FB instances
5) ensure the primary database had ALTER DATABASE INCLUDE ALL TO
PUBLICATION and ALTER DATABASE ENABLE PUBLICATION executed
6) connect to the primary database, make some modifications, commit
7) ensure at least one file has appeared in primary's log_directory
8) after log_archive_timeout seconds, ensure at least one file (with the
same name as above) has appeared in primary's log_archive_directory
9) ensure it also appeared in replica's log_source_directory (maybe
after timeout if some external tool is moving the files)
10) if verbose_logging is specified (and after apply_idle_timeout
seconds), ensure replica's replication.log contains lines about the
replication process
How do you setup async replication if the replica is on a different
Firebird Server? Do you have to have an external process copying journal
files to replica server? If so, which files need copying and to which
folder(s)? or, can set up log_directory to be on the replica server
rather than the master server?
Three options are possible:
1) Mount replica's shared directory as a primary's network disk
2) Mount primary's shared directory as a replica's network disk
in these cases log_archive_directory and log_source directory point to
the same physical directory under different names (local and network)
3) Both directories are local, some external process periodically moves
the files. All files from the primary's log_archive_directory should be
moved to the replica's log_source_directory. Those that are not
accessible by the mover should be skipped until the next iteration
(they're still being written to by the primary instance).
Dmitry
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel