| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- #
- # Replication configuration
- #
- database
- {
- ### PRIMARY SIDE SETTINGS
- # Plugin used to perform replication.
- # Leave it empty to use built-in replication.
- #
- # plugin =
- # Pattern (regular expression) that defines what schemas must be included into
- # replication. By default, tables from all schemas are replicated.
- #
- # include_schema_filter =
- # Pattern (regular expression) that defines what schemas must be excluded from
- # replication. By default, tables from all schemas are replicated.
- #
- # exclude_schema_filter =
- # Pattern (regular expression) that defines what tables must be included into
- # replication. By default, all tables are replicated.
- #
- # include_filter =
- # Pattern (regular expression) that defines what tables must be excluded from
- # replication. By default, all tables are replicated.
- #
- # exclude_filter =
- # Boolean parameters describing how replication errors must be handled.
- #
- # log_errors = true # All errors (and warnings) are written to replication.log
- # report_errors = false # Errors are returned to the client application
- # disable_on_error = true # Replication is disabled after error
- ### Parameters specific for built-in replication
- # Size of the local buffer used to accumulate changes that can be
- # deferred until the transaction commit/rollback. The bigger this value
- # the less disk access concurrency (related to journal IOPS) happens.
- #
- # For synchronous replication, it also affects number of network round-trips
- # between primary and replica hosts.
- # However, a larger buffer costs a longer replication "checkpoints"
- # (delay to synchronize the original database with its replica at commit).
- #
- # buffer_size = 1048576 # 1MB
- # Directory to store replication journal files.
- #
- # journal_directory =
- # Prefix for replication journal file names. It will be automatically suffixed
- # with an ordinal sequential number. If not specified, database filename
- # (without path) is used as a prefix.
- #
- # journal_file_prefix =
- # Maximum allowed size for a single replication segment.
- #
- # journal_segment_size = 16777216 # 16MB
- # Maximum allowed number of full replication segments. Once this limit is reached,
- # the replication process is temporarily delayed to allow the archiving to catch up.
- # If any of the full segments is not archived during one minute,
- # the replication fails with an error.
- #
- # Zero means an unlimited number of segments pending archiving.
- #
- # journal_segment_count = 8
- # Delay, in milliseconds, to wait before the changes are synchronously flushed
- # to the journal (usually at commit time). This allows multiple concurrently committing
- # transactions to amortise I/O costs by sharing a single flush operation.
- #
- # Zero means no delay, i.e. "group flushing" is disabled.
- #
- # journal_group_flush_delay = 0
- # Directory for the archived journal files.
- #
- # Directory to store archived replication segments.
- # It also defines the $(archpathname) substitution macro (see below).
- #
- # journal_archive_directory =
- # Program (complete command line with arguments) that is executed when some
- # replication segment gets full and needs archiving.
- #
- # This program MUST return zero ONLY if archiving has been performed successfully.
- # In particular, it MUST return non-zero if the target archive already exists.
- #
- # Special predefined macros are available:
- # $(filename) - file name (without path) of the journal segment being archived
- # $(pathname) - full path name of the journal segment being archived
- # same as journal_directory + $(filename)
- # $(archivepathname) - suggested full path name for the archived segment
- # same as journal_archive_directory + $(filename)
- #
- # Simplest configuration is to use standard OS commands for archiving, e.g.:
- #
- # Linux: "test ! -f $(archivepathname) && cp $(pathname) $(archivepathname)"
- # or
- # Windows: "copy $(pathname) $(archivepathname)"
- #
- # journal_archive_command =
- # Timeout, in seconds, to wait until incomplete segment is scheduled for archiving.
- # It allows to minimize the replication gap if the database is modified rarely.
- #
- # Zero means no intermediate archiving, i.e. segments are archived only after
- # reaching their maximum size (defined by journal_segment_size).
- #
- # journal_archive_timeout = 60
- # Connection string to the replica database (used for synchronous replication only).
- # Expected format:
- #
- # [<login>:<password>@]<database connection string>
- #
- # Examples:
- #
- # server2:replica
- # john:smith@server2:replica
- # server2:/my/replica/database.fdb
- # john:smith@server2:/my/replica/database.fdb
- #
- # Multiple entries are allowed (for different synchronous replicas).
- #
- # sync_replica =
- #
- # It's also possible to configure replicas as separate sub-sections, e.g.:
- #
- # sync_replica = server1:replica
- # {
- # username = john
- # password = smith
- # }
- #
- # sync_replica = server2:replica
- # {
- # username = john
- # password = smith
- # }
- #
- # This way characters ':' and '@' are allowed inside username/password or database pathname.
- #
- # Alternative parameters -- username_env, password_env, username_file, password_file -- allow
- # to specify username and password externally, using either environment variables or
- # plain text files respectively, e.g.:
- #
- # sync_replica = server2:/my/replica/database.fdb
- # {
- # username_env = FB_REPL_USER
- # password_file = /opt/firebird/repl_pwd.txt
- # }
- #
- # sync_replica = server2:/my/replica/database.fdb
- # {
- # username_file = /opt/firebird/repl_user.txt
- # password_env = FB_REPL_PWD
- # }
- #
- # If username_file / password_file is specified, the first line
- # of the provided file is used as the parameter value.
- #
- # If username_file or password_file values represent a relative pathname,
- # it's resolved based on the Firebird root directory:
- #
- # password_file = repl_pwd.txt # => resolves to /opt/firebird/repl_pwd.txt
- ### REPLICA SIDE SETTINGS
- # If enabled, changes applied to replica will be also subject of further
- # replication (if any configured).
- #
- # cascade_replication = false
- ### Parameters specific for built-in replication
- # Directory to search for the journal files to be replicated.
- #
- # journal_source_directory =
- # Filter to limit replication to the particular source database (based on its GUID).
- # Expected format: "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
- # Note that double quotes are mandatory, as well as curly braces.
- #
- # source_guid =
- # If enabled, replication.log contains the detailed log of operations performed
- # by the replication server. Otherwise (by default), only errors and warnings are logged.
- #
- # verbose_logging = false
- # Timeout (in seconds) to wait before scanning for the new replication segments.
- #
- # It's used to pause the replication server when all existing segments are already applied
- # to the replica database and there are no new segments in the specified directory.
- #
- # apply_idle_timeout = 10
- # Timeout (in seconds) to wait before retrying to apply the queued segments after error.
- #
- # It's used to pause the replication server after some critical error happened during replication.
- # In this case, the server disconnects from the replica database, sleeps for the specified timeout,
- # then reconnects back and tries to re-apply the latest segments from the point of failure.
- #
- # apply_error_timeout = 60
- # Schema search path for compatibility with Firebird versions below 6.0
- #
- # Firebird master databases below v6 has no schemas, so use this search path in the replica to
- # locate the objects.
- # Used only with asynchronous replication.
- #
- # schema_search_path =
- }
- #
- # Database-specific settings belong here, e.g.
- #
- # (for the primary side)
- #
- # database = /your/db.fdb
- # {
- # (for synchronous replication)
- #
- # sync_replica = sysdba:masterkey@otherhost:/your/replica.fdb
- #
- # (for asynchronous replication)
- #
- # journal_directory = /your/db/journal
- # journal_archive_directory = /your/db/archive
- # journal_archive_timeout = 10
- # }
- #
- # (for the replica side)
- #
- # database = /your/db.fdb
- # {
- # journal_source_directory = /your/db/source
- # }
|