2
0

replication.conf 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. #
  2. # Replication configuration
  3. #
  4. database
  5. {
  6. ### PRIMARY SIDE SETTINGS
  7. # Plugin used to perform replication.
  8. # Leave it empty to use built-in replication.
  9. #
  10. # plugin =
  11. # Pattern (regular expression) that defines what schemas must be included into
  12. # replication. By default, tables from all schemas are replicated.
  13. #
  14. # include_schema_filter =
  15. # Pattern (regular expression) that defines what schemas must be excluded from
  16. # replication. By default, tables from all schemas are replicated.
  17. #
  18. # exclude_schema_filter =
  19. # Pattern (regular expression) that defines what tables must be included into
  20. # replication. By default, all tables are replicated.
  21. #
  22. # include_filter =
  23. # Pattern (regular expression) that defines what tables must be excluded from
  24. # replication. By default, all tables are replicated.
  25. #
  26. # exclude_filter =
  27. # Boolean parameters describing how replication errors must be handled.
  28. #
  29. # log_errors = true # All errors (and warnings) are written to replication.log
  30. # report_errors = false # Errors are returned to the client application
  31. # disable_on_error = true # Replication is disabled after error
  32. ### Parameters specific for built-in replication
  33. # Size of the local buffer used to accumulate changes that can be
  34. # deferred until the transaction commit/rollback. The bigger this value
  35. # the less disk access concurrency (related to journal IOPS) happens.
  36. #
  37. # For synchronous replication, it also affects number of network round-trips
  38. # between primary and replica hosts.
  39. # However, a larger buffer costs a longer replication "checkpoints"
  40. # (delay to synchronize the original database with its replica at commit).
  41. #
  42. # buffer_size = 1048576 # 1MB
  43. # Directory to store replication journal files.
  44. #
  45. # journal_directory =
  46. # Prefix for replication journal file names. It will be automatically suffixed
  47. # with an ordinal sequential number. If not specified, database filename
  48. # (without path) is used as a prefix.
  49. #
  50. # journal_file_prefix =
  51. # Maximum allowed size for a single replication segment.
  52. #
  53. # journal_segment_size = 16777216 # 16MB
  54. # Maximum allowed number of full replication segments. Once this limit is reached,
  55. # the replication process is temporarily delayed to allow the archiving to catch up.
  56. # If any of the full segments is not archived during one minute,
  57. # the replication fails with an error.
  58. #
  59. # Zero means an unlimited number of segments pending archiving.
  60. #
  61. # journal_segment_count = 8
  62. # Delay, in milliseconds, to wait before the changes are synchronously flushed
  63. # to the journal (usually at commit time). This allows multiple concurrently committing
  64. # transactions to amortise I/O costs by sharing a single flush operation.
  65. #
  66. # Zero means no delay, i.e. "group flushing" is disabled.
  67. #
  68. # journal_group_flush_delay = 0
  69. # Directory for the archived journal files.
  70. #
  71. # Directory to store archived replication segments.
  72. # It also defines the $(archpathname) substitution macro (see below).
  73. #
  74. # journal_archive_directory =
  75. # Program (complete command line with arguments) that is executed when some
  76. # replication segment gets full and needs archiving.
  77. #
  78. # This program MUST return zero ONLY if archiving has been performed successfully.
  79. # In particular, it MUST return non-zero if the target archive already exists.
  80. #
  81. # Special predefined macros are available:
  82. # $(filename) - file name (without path) of the journal segment being archived
  83. # $(pathname) - full path name of the journal segment being archived
  84. # same as journal_directory + $(filename)
  85. # $(archivepathname) - suggested full path name for the archived segment
  86. # same as journal_archive_directory + $(filename)
  87. #
  88. # Simplest configuration is to use standard OS commands for archiving, e.g.:
  89. #
  90. # Linux: "test ! -f $(archivepathname) && cp $(pathname) $(archivepathname)"
  91. # or
  92. # Windows: "copy $(pathname) $(archivepathname)"
  93. #
  94. # journal_archive_command =
  95. # Timeout, in seconds, to wait until incomplete segment is scheduled for archiving.
  96. # It allows to minimize the replication gap if the database is modified rarely.
  97. #
  98. # Zero means no intermediate archiving, i.e. segments are archived only after
  99. # reaching their maximum size (defined by journal_segment_size).
  100. #
  101. # journal_archive_timeout = 60
  102. # Connection string to the replica database (used for synchronous replication only).
  103. # Expected format:
  104. #
  105. # [<login>:<password>@]<database connection string>
  106. #
  107. # Examples:
  108. #
  109. # server2:replica
  110. # john:smith@server2:replica
  111. # server2:/my/replica/database.fdb
  112. # john:smith@server2:/my/replica/database.fdb
  113. #
  114. # Multiple entries are allowed (for different synchronous replicas).
  115. #
  116. # sync_replica =
  117. #
  118. # It's also possible to configure replicas as separate sub-sections, e.g.:
  119. #
  120. # sync_replica = server1:replica
  121. # {
  122. # username = john
  123. # password = smith
  124. # }
  125. #
  126. # sync_replica = server2:replica
  127. # {
  128. # username = john
  129. # password = smith
  130. # }
  131. #
  132. # This way characters ':' and '@' are allowed inside username/password or database pathname.
  133. #
  134. # Alternative parameters -- username_env, password_env, username_file, password_file -- allow
  135. # to specify username and password externally, using either environment variables or
  136. # plain text files respectively, e.g.:
  137. #
  138. # sync_replica = server2:/my/replica/database.fdb
  139. # {
  140. # username_env = FB_REPL_USER
  141. # password_file = /opt/firebird/repl_pwd.txt
  142. # }
  143. #
  144. # sync_replica = server2:/my/replica/database.fdb
  145. # {
  146. # username_file = /opt/firebird/repl_user.txt
  147. # password_env = FB_REPL_PWD
  148. # }
  149. #
  150. # If username_file / password_file is specified, the first line
  151. # of the provided file is used as the parameter value.
  152. #
  153. # If username_file or password_file values represent a relative pathname,
  154. # it's resolved based on the Firebird root directory:
  155. #
  156. # password_file = repl_pwd.txt # => resolves to /opt/firebird/repl_pwd.txt
  157. ### REPLICA SIDE SETTINGS
  158. # If enabled, changes applied to replica will be also subject of further
  159. # replication (if any configured).
  160. #
  161. # cascade_replication = false
  162. ### Parameters specific for built-in replication
  163. # Directory to search for the journal files to be replicated.
  164. #
  165. # journal_source_directory =
  166. # Filter to limit replication to the particular source database (based on its GUID).
  167. # Expected format: "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
  168. # Note that double quotes are mandatory, as well as curly braces.
  169. #
  170. # source_guid =
  171. # If enabled, replication.log contains the detailed log of operations performed
  172. # by the replication server. Otherwise (by default), only errors and warnings are logged.
  173. #
  174. # verbose_logging = false
  175. # Timeout (in seconds) to wait before scanning for the new replication segments.
  176. #
  177. # It's used to pause the replication server when all existing segments are already applied
  178. # to the replica database and there are no new segments in the specified directory.
  179. #
  180. # apply_idle_timeout = 10
  181. # Timeout (in seconds) to wait before retrying to apply the queued segments after error.
  182. #
  183. # It's used to pause the replication server after some critical error happened during replication.
  184. # In this case, the server disconnects from the replica database, sleeps for the specified timeout,
  185. # then reconnects back and tries to re-apply the latest segments from the point of failure.
  186. #
  187. # apply_error_timeout = 60
  188. # Schema search path for compatibility with Firebird versions below 6.0
  189. #
  190. # Firebird master databases below v6 has no schemas, so use this search path in the replica to
  191. # locate the objects.
  192. # Used only with asynchronous replication.
  193. #
  194. # schema_search_path =
  195. }
  196. #
  197. # Database-specific settings belong here, e.g.
  198. #
  199. # (for the primary side)
  200. #
  201. # database = /your/db.fdb
  202. # {
  203. # (for synchronous replication)
  204. #
  205. # sync_replica = sysdba:masterkey@otherhost:/your/replica.fdb
  206. #
  207. # (for asynchronous replication)
  208. #
  209. # journal_directory = /your/db/journal
  210. # journal_archive_directory = /your/db/archive
  211. # journal_archive_timeout = 10
  212. # }
  213. #
  214. # (for the replica side)
  215. #
  216. # database = /your/db.fdb
  217. # {
  218. # journal_source_directory = /your/db/source
  219. # }