1BUCARDO(1) User Contributed Perl Documentation BUCARDO(1)
2
3
4
6 bucardo - utility script for controlling the Bucardo program
7
9 This document describes version 5.6.0 of bucardo
10
12 bucardo [<options>] <command> [<action>] [<command-options>] [<command-params>]
13
15 The bucardo script is the main interaction to a running Bucardo
16 instance. It can be used to start and stop Bucardo, add new items, kick
17 syncs, and even install and upgrade Bucardo itself. For more complete
18 documentation, please view the wiki <https://bucardo.org/>.
19
21 Run "bucardo help <command>" for additional details
22
23 "install"
24 Installs the Bucardo configuration database.
25
26 "upgrade"
27 Upgrades the Bucardo configuration database to the latest schema.
28
29 "start [<start options>] [<reason>]"
30 Starts Bucardo.
31
32 "stop [<reason>]"
33 Stops Bucardo.
34
35 "restart [<start options>] [<reason>]"
36 Stops and starts Bucardo.
37
38 "list <type> [<regex>]"
39 Lists objects managed by Bucardo.
40
41 "add <type> <name> <parameters>"
42 Adds a new object.
43
44 "update <type> <name> <parameters>"
45 Updates an object.
46
47 "remove <type> <name> [<name>...]"
48 Removes one or more objects.
49
50 "kick <syncname> [<sync options>] [<syncname>...] [<timeout>]"
51 Kicks off one or more syncs.
52
53 "reload config"
54 Sends a message to all CTL and KID processes asking them to reload
55 the Bucardo configuration.
56
57 "reopen"
58 Sends a message to all Bucardo processes asking them to reopen any
59 log files they may have open. Call this after you have rotated the
60 log file(s).
61
62 "show all|<setting> [<setting>...]"
63 Shows the current Bucardo settings.
64
65 "<set <setting=value" [<setting=value>...] >>
66 Sets one or more configuration setting..
67
68 "ping [<timeout>]"
69 Sends a ping notice to the MCP process to see if it will respond.
70
71 "status [<status options>] <syncname> [<syncname>...]"
72 Shows the brief status of syncs in a tabular format.
73
74 "activate <syncname> [<syncname>...] [<timeout>]"
75 Activates one or more named syncs.
76
77 "deactivate <syncname> [<syncname>...] [<timeout>]"
78 Deactivates one or more named syncs.
79
80 "message '<body>'"
81 Sends a message to the running Bucardo logs.
82
83 "reload [<syncname> [<syncname>...]]"
84 Sends a message to one or more sync processes, instructing them to
85 reload.
86
87 "inspect <type> <name> [<name>...]"
88 Inspects one or more objects of a particular type.
89
90 "validate all|<syncname> [<syncname>...]"
91 Validates one or more syncs.
92
93 "purge all|<table> [<table>...]"
94 Purges the delta and track tables for one or more tables, for one
95 or more databases.
96
97 "delta [<database(s)>]"
98 Show the delta counts for each source target.
99
100 "help [<command> [<action>]]"
101 Shows help.
102
104 -d --db-name NAME Database name.
105 -U --db-user USER Database user name.
106 -P --db-pass PASS Database password.
107 -h --db-host HOST Database server host name.
108 -p --db-port PORT Database server port number.
109 --bucardorc FILE Use specified .bucardorc file.
110 --no-bucardorc Do not use .bucardorc file.
111 --quiet Incremental quiet.
112 --verbose Incremental verbose mode.
113 -? --help Output basic help and exit.
114 --version Print the version number and exit.
115 --dryrun Do not perform any actual actions.
116 --confirm Require direct confirmation before changes.
117
119 Most of the commands take parameters. These may be passed after the
120 command name and, where appropriate, an object name. Parameters take
121 the form of key/value pairs separated by an equal sign ("="). For
122 example:
123
124 bucardo add db sea_widgets dbname=widgets host=db.example.com
125
126 Here "dbname" and <host> are parameters.
127
128 Many of the commands also use command-line options, which are specified
129 in the normal way. For example, the "bucardo add db" command could also
130 be written as:
131
132 bucardo add db sea_widgets --dbname widgets --dbhost db.example.com
133
134 However, parameters and options are not directly interchangeable in all
135 cases. See the documentation for individual commands for their
136 supported options.
137
138 install
139 bucardo install
140
141 Installs the Bucardo schema from the file bucardo.schema into an
142 existing Postgres cluster. The user "bucardo" and database "bucardo"
143 will be created first as needed. This is an interactive installer, but
144 you can supply the following values from the command line:
145
146 "--dbuser"
147 defaults to postgres
148
149 "--dbname"
150 defaults to postgres
151
152 "--dbport"
153 defaults to 5432
154
155 "--pid-dir"
156 defaults to /var/run/bucardo/
157
158 upgrade
159 bucardo upgrade
160
161 Upgrades an existing Bucardo installation to the current version of the
162 bucardo database script. Requires that bucardo and the bucardo.schema
163 file be the same version. All changes should be backwards compatible,
164 but you may need to re-validate existing scripts to make sure changes
165 get propagated to all databases.
166
167 start
168 bucardo start "Reason"
169
170 Starts Bucardo. Fails if the MCP process is running (determined if its
171 PID file is present). Otherwise, starts cleanly by first issuing the
172 equivalent of a stop to ask any existing Bucardo processes to exit, and
173 then starting a new Bucardo MCP process. A short reason and name should
174 be provided - these are written to the "reason_file" file
175 (./bucardo.restart.reason.txt by default) and sent in the email sent
176 when Bucardo has been started up. It is also appended to the reason
177 log, which has the same name as the the "reason_file" but ends in .log.
178
179 The options for the "start" command are:
180
181 "--sendmail"
182 Tells Bucardo whether or not to send mail on interesting events:
183 startup, shutdown, and errors. Default is on.
184
185 "--extra-name string"
186 A short string that will be appended to the version string as
187 output by the Bucardo process names. Mostly useful for debugging.
188
189 "--log-destination destination"
190 Determines the destination for logging output. The supported values
191 are:
192
193 "stderr"
194 "stdout"
195 "syslog"
196 "none"
197 A file system directory.
198
199 May be specified more than once, which is useful for, e.g., logging
200 both to a directory and to syslog. If "--log-destination" is not
201 specified at all, the default is to log to files in
202 /var/log/bucardo.
203
204 "--log-separate"
205 Forces creation of separate log files for each Bucardo process of
206 the form "log.bucardo.X.Y", where X is the type of process (MCP,
207 CTL, or KID), and Y is the process ID.
208
209 "--log-extension string"
210 Appends the given string to the end of the default log file name,
211 log.bucardo. A dot is added before the name as well, so a log
212 extension of "rootdb" would produce a log file named
213 log.bucardo.rootdb.
214
215 "--log-clean"
216 Forces removal of all old log files before running.
217
218 "--debug"
219 "--no-debug"
220 Enable or disable debugging output. Disabled by default.
221
222 "--exit-on-nosync"
223 "--no-exit-on-nosync"
224 On startup, if Bucardo finds no active syncs, it normally will
225 continue to run, requiring a restart once syncs are added. This is
226 useful for startup scripts and whatnot.
227
228 If, however, you want it to exit when there are no active syncs,
229 pass the "--exit-on-nosync" option. You can also be explicit that
230 it should not exit when there are no syncs by passing
231 "--no-exit-on-nosync". This is the default value.
232
233 stop
234 bucardo stop "Reason"
235
236 Forces Bucardo to quit by creating a stop file which all MCP, CTL, and
237 KID processes should detect and cause them to exit. Note that active
238 syncs will not exit right away, as they will not look for the stop file
239 until they have finished their current run. Typically, you should scan
240 the list of processes after running this program to make sure that all
241 Bucardo processes have stopped. One should also provide a reason for
242 issuing the stop - usually this is a short explanation and your name.
243 This is written to the "reason_file" file (./bucardo.restart.reason.txt
244 by default) and is also used by Bucardo when it exits and sends out
245 mail about its death. It is also appended to the reason log, which has
246 the same name as the the "reason_file" but ends in .log.
247
248 restart
249 bucardo restart "Reason"
250
251 Stops bucardo, waits for the stop to complete, and then starts it
252 again. Supports the same options as <"start"/start>. Useful for start
253 scripts. For getting just CTL and KID processes to recognize newly
254 added, updated, or removed objects, use the "reload" command, instead.
255
256 list
257 bucardo list <type> <regex>
258
259 Lists summary information about Bucardo objects. The supported types
260 are:
261
262 · "database"
263
264 · "dbgroup"
265
266 · "relgroup"
267
268 · "sync"
269
270 · "table"
271
272 · "sequence"
273
274 · "customcode"
275
276 · "customname"
277
278 · "customcols"
279
280 · "all"
281
282 The "all" option will list information about all object types.
283
284 The optional "regex" option can be used to filter the list to only
285 those matching a regular expression.
286
287 add
288 bucardo add <type> <name> <parameters>
289
290 Adds a new object to Bucardo. The "type" specifies the type of object
291 to add, while the "name" should be the name of the object. The
292 supported types include:
293
294 "db"
295 "dbgroup"
296 "table"
297 "sequence"
298 "all tables"
299 "all sequences"
300 "relgroup"
301 "sync"
302 "customname"
303 "customcols"
304
305 add db
306
307 bucardo add db <name> dbname=actual_name port=xxx host=xxx user=xxx
308
309 Adds one or more new databases. The "name" is the name by which the
310 database will be known to Bucardo, and must be unique. This may vary
311 from the actual database name, as multiple hosts might have databases
312 with the same name. Multiple databases can be added by separating the
313 names with commas. Options that differ between the databases should be
314 separated by a matching commas. Example:
315
316 bucardo add db alpha,beta dbname=sales host=aa,bb user=bucardo
317
318 This command will attempt an immediate test connection to the added
319 database(s). The supported named parameters are:
320
321 "dbname"
322 The actual name of the database. Required unless using a service
323 file or setting it via dbdsn.
324
325 "type"
326 The type of the database. Defaults to "postgres". Currently
327 supported values are:
328
329 · "postgres"
330
331 · "drizzle"
332
333 · "mongo"
334
335 · "mysql"
336
337 · "maria"
338
339 · "oracle"
340
341 · "redis"
342
343 · "sqlite"
344
345 "dbdsn"
346 A direct DSN to connect to a database. Will override all other
347 connection options if set.
348
349 "user"
350 The username Bucardo should use when connecting to this database.
351
352 "pass"
353 The password Bucardo should use when connecting to this database.
354 It is recommended that you use a .pgpass file rather than entering
355 the password here.
356
357 "host"
358 The host Bucardo should use when connecting to this database.
359 Defaults to the value of the $PGHOSTADDR or $PGHOST environment
360 variables, if present.
361
362 "port"
363 The port Bucardo should use when connecting to this database.
364 Defaults to the value of the $PGPORT environment variable, if
365 present.
366
367 "conn"
368 Additional connection parameters, e.g. "sslmode=require".
369
370 "service"
371 The service name Bucardo should use when connecting to this
372 database.
373
374 "status"
375 Initial status of this database. Defaults to "active" but can be
376 set to "inactive".
377
378 "dbgroup"
379 Name of the database group this database should belong to.
380
381 "addalltables"
382 Automatically add all tables from this database.
383
384 "addallsequences"
385 Automatically add all sequences from this database.
386
387 "server_side_prepares"
388 "ssp"
389 Set to 1 or 0 to enable or disable server-side prepares. Defaults
390 to 1.
391
392 "makedelta"
393 Set to 1 or 0 to enable or disable makedelta. Defaults to 0.
394
395 Additional parameters:
396
397 "--force"
398 Forces the database to be added without running a connection test.
399
400 Note: As a convenience, if the "dbuser" value is its default value,
401 "bucardo", in the event that Bucardo cannot connect to the database, it
402 will try connecting as "postgres" and create a superuser named
403 "bucardo". This is to make things easier for folks getting started with
404 Bucardo, but will not work if it cannot connect as "postgres", or if it
405 the connection failed due to an authentication failure.
406
407 add dbgroup
408
409 bucardo add dbgroup name db1:source db2:source db3:target ...
410
411 Adds one or more databases to the named dbgroup. If the dbgroup doesn't
412 exist, it will be created. The database parameters should specify their
413 roles, either "source" or "target".
414
415 add table
416
417 bucardo add table [schema].table db=actual_db_name
418
419 Adds a table object. The table information will be read from the
420 specified database. Supported parameters:
421
422 "db"
423 The name of the database from which to read the table information.
424 Should be a name known to Bucardo, thanks to a previous call to
425 "add database". Required.
426
427 "autokick"
428 Boolean indicating whether or not the table should automatically
429 send kick messages when it's modified. Overrides the "autokick"
430 parameter of any syncs of which the table is a part.
431
432 "rebuild_index"
433 Boolean indicating whether or not to rebuild indexes after every
434 sync. Off by default. Optional.
435
436 "analyze_after_copy"
437 Boolean indicating whether or not to analyze the table after every
438 sync. Off by default. Optional.
439
440 "vacuum_after_copy"
441 Boolean indicating whether or not to vacuum the table after every
442 sync. Off by default. Optional.
443
444 "relgroup"
445 Adds the table to the named relgroup. If the relgroup does not
446 exist, it will be created. Optional.
447
448 "makedelta"
449 Turns makedelta magic on or off. Value is a list of databases which
450 need makedelta for this table. Value can also be "on" to enable
451 makedelta for all databases. Defaults to "off".
452
453 "strict_checking"
454 Boolean indicating whether or not to be strict when comparing the
455 table between syncs. If the columns have different names or data
456 types, the validation will fail. But perhaps the columns are
457 allowed to have different names or data types. If so, disable
458 "strict_checking" and column differences will result in warnings
459 rather than failing the validation. Defaults to true.
460
461 add sequence
462
463 bucardo add sequence [schema].sequence relgroup=xxx
464
465 "db"
466 The name of the database from which to read the sequence
467 information. Should be a name known to Bucardo, thanks to a
468 previous call to "add database". Required.
469
470 "relgroup"
471 Adds the sequence to the named relgroup. If the relgroup does not
472 exist, it will be created. Optional.
473
474 add all tables
475
476 bucardo add all tables [relgroup=xxx] [pkonly]
477
478 Adds all the tables in all known databases or in a specified database.
479 Excludes tables in the "pg_catalog", "information_schema", and
480 "bucardo" schemas. (Yes, this means that you cannot replicate the
481 Bucardo configuration database using Bucardo. Sorry about that.)
482 Supported options and parameters:
483
484 "db"
485 "--db"
486 Name of the database from which to find all the tables to add. If
487 not provided, tables will be added from all known databases.
488
489 "schema"
490 "--schema"
491 "-n"
492 Limit to the tables in the specified comma-delimited list of
493 schemas. The options may be specified more than once.
494
495 "exclude-schema"
496 "--exclude-schema"
497 "-N"
498 Exclude tables in the specified comma-delimited list of schemas.
499 The options may be specified more than once.
500
501 "table"
502 "--table"
503 "-t"
504 Limit to the specified tables. The options may be specified more
505 than once.
506
507 "exclude-table"
508 "--exclude-table"
509 "-T"
510 Exclude the specified tables. The options may be specified more
511 than once.
512
513 "relgroup"
514 "--relgroup"
515 Name of the relgroup to which to add new tables.
516
517 "pkonly"
518 Exclude tables without primary keys.
519
520 add all sequences
521
522 bucardo add all sequences relgroup=xxx
523
524 Adds all the sequences in all known databases or in a specified
525 database. Excludes sequences in the "pg_catalog",
526 "information_schema", and "bucardo" schemas. (Yes, this means that you
527 cannot replicate the Bucardo configuration database using Bucardo.
528 Sorry about that.) Supported options and parameters:
529
530 "db"
531 "--db"
532 Name of the database from which to find all the sequences to add.
533 If not provided, sequences will be added from all known databases.
534
535 "schema"
536 "--schema"
537 "-n"
538 Limit to the sequences in the specified comma-delimited list of
539 schemas. The options may be specified more than once.
540
541 "exclude-schema"
542 "--exclude-schema"
543 "-N"
544 Exclude sequences in the specified comma-delimited list of schemas.
545 The options may be specified more than once.
546
547 "relgroup"
548 "--relgroup"
549 Name of the relgroup to which to add new tables or sequences.
550
551 add relgroup
552
553 bucardo add relgroup name
554 bucardo add relgroup name table, sequence, ...
555
556 Adds a relgroup. After the name, pass in an optional list of tables
557 and/or sequences and they will be added to the group.
558
559 add sync
560
561 bucardo add sync name relgroup=xxx dbs=xxx
562
563 Adds a sync, which is a named replication event containing information
564 about what to replicate from where to where. The supported parameters
565 are:
566
567 "dbs"
568 The name of a dbgroup or comma-delimited list of databases. All of
569 the specified databases will be synchronized. Required.
570
571 "dbgroup"
572 The name of a dbgroup. All of the databases within this group will
573 be part of the sync. If the dbgroup does not exists and a separate
574 list of databases is given, the group will be created and
575 populated.
576
577 "relgroup"
578 The name of a relgroup to synchronize. All of the tables and/or
579 sequences in the relgroup will be synchronized. Required unless
580 "tables" is specified.
581
582 "tables"
583 List of tables to add to the sync. This implicitly creates a
584 relgroup with the same name as the sync. Required unless "relgroup"
585 is specified.
586
587 "status"
588 Indicates whether or not the sync is active. Must be either
589 "active" or "inactive". Defaults to "active".
590
591 "rebuild_index"
592 Boolean indicating whether or not to rebuild indexes after every
593 sync. Defaults to off.
594
595 "lifetime"
596 Number of seconds a KID can live before being reaped. No limit by
597 default.
598
599 "maxkicks"
600 Number of times a KID may be kicked before being reaped. No limit
601 by default.
602
603 "conflict_strategy"
604 The conflict resolution strategy to use in the sync. Supported
605 values:
606
607 "bucardo_source"
608 The rows on the "source" database always "win". In other words,
609 in a conflict, Bucardo copies rows from source to target.
610
611 "bucardo_target"
612 The rows on the "target" database always win.
613
614 "bucardo_skip"
615 Any conflicting rows are simply not replicated. Not recommended
616 for most cases.
617
618 "bucardo_random"
619 Each database has an equal chance of winning each time. This is
620 the default.
621
622 "bucardo_latest"
623 The row that was most recently changed wins.
624
625 "bucardo_abort"
626 The sync is aborted on a conflict.
627
628 "onetimecopy"
629 Determines whether or not a sync should switch to a full copy mode
630 for a single run. Supported values are:
631
632 0: off
633 1: always full copy
634 2: only copy tables that are empty on the target
635 "stayalive"
636 Boolean indicating whether or not the sync processes (CTL) should
637 be persistent. Defaults to false.
638
639 "kidsalive"
640 Boolean indicating whether or not the sync child processes (KID)
641 should be persistent. Defaults to false.
642
643 "autokick"
644 Boolean indicating whether or not tables in the sync should
645 automatically send kick messages when they're modified. May be
646 overridden by the "autokick" parameter of individual tables.
647
648 "checktime"
649 An interval specifying the maximum time a sync should go before
650 being kicked. Useful for busy systems where you don't want the
651 overhead of notify triggers.
652
653 "priority"
654 An integer indicating the priority of the sync. Lower numbers are
655 higher priority. Currently used only for display purposes.
656
657 "analyze_after_copy"
658 Boolean indicating whether or not to analyze tables after every
659 sync. Off by default. Optional.
660
661 "overdue"
662 An interval specifying the amount of time after which the sync has
663 not run that it should be considered overdue. "check_bucardo_sync"
664 issues a warning when a sync has not been run in this amount of
665 time.
666
667 "expired"
668 An interval specifying the amount of time after which the sync has
669 not run that it should be considered expired. "check_bucardo_sync"
670 issues a critical message when a sync has not been run in this
671 amount of time.
672
673 "track_rates"
674 Boolean indicating whether or not to track synchronization rates.
675
676 "rebuild_index"
677 Boolean indicating whether or not to rebuild indexes after every
678 sync. Off by default. Optional.
679
680 "strict_checking"
681 Boolean indicating whether or not to be strict when comparing
682 tables in the sync. If the columns have different names or data
683 types, the validation will fail. But perhaps the columns are
684 allowed to have different names or data types. If so, disable
685 "strict_checking" and column differences will result in warnings
686 rather than failing the validation. Defaults to true.
687
688 add customname
689
690 bucardo add customname oldname newname [db=name] [sync=name]
691
692 Creates a new Bucardo custom name mapping. This allows the tables
693 involved in replication to have different names on different databases.
694 The "oldname" must contain the schema as well as the table name (if the
695 source database supports schemas). The optional parameters limit it to
696 one or more databases, and/or to one or more syncs. Supported
697 parameters:
698
699 "sync"
700 A sync to which to add the customname. May be specified multiple
701 times.
702
703 "database"
704 "db"
705 A database for which to add the customname. May be specified
706 multiple times.
707
708 add customcols
709
710 bucardo add customcols tablename select_clause [sync=x db=x]
711
712 Specify the list of columns to select from when syncing. Rather than
713 the default "SELECT *" behavior, you can specify any columns you want,
714 including the use of function call return values and things not in the
715 source column list. The optional parameters limit it to one or more
716 databases, and/or to one or more syncs. Some examples:
717
718 bucardo add customcols public.foobar "select a, b, c"
719 bucardo add customcols public.foobar "select a, upper(b) AS b, c" db=foo
720 bucardo add customcols public.foobar "select a, b, c" db=foo sync=abc
721
722 Supported parameters:
723
724 "sync"
725 A sync to which to add the customcols. May be specified multiple
726 times.
727
728 "database"
729 "db"
730 A database for which to add the customcols. May be specified
731 multiple times.
732
733 add customcode
734
735 bucardo add customcode <name> <whenrun=value> <src_code=filename> [optional information]
736
737 Adds a customcode, which is a Perl subroutine that can be run at
738 certain points in the sync process. It might handle exceptions, handle
739 conflicts, or just run at certain times with no expectation of
740 functionality (e.g., before Bucardo drops triggers). Metadata about
741 that point will be passed to the subroutine as a hash reference.
742
743 Supported parameters:
744
745 "name"
746 The name of the custom code object.
747
748 "about"
749 A short description of the custom code.
750
751 "whenrun"
752 "when_run"
753 A string indicating when the custom code should be run. Supported
754 values include:
755
756 "before_txn"
757 "before_check_rows"
758 "before_trigger_drop"
759 "after_trigger_drop"
760 "after_table_sync"
761 "exception"
762 "conflict"
763 "before_trigger_enable"
764 "after_trigger_enable"
765 "after_txn"
766 "before_sync"
767 "after_sync"
768 "getdbh"
769 Boolean indicating whether or not Perl DBI database handles should
770 be provided to the custom code subroutine. If true, database
771 handles will be provided under the "dbh" key of the hash reference
772 passed to the subroutine. The value under this key will be a hash
773 reference mapping database names to their respective handles.
774
775 "sync"
776 Name of the sync with which to associate the custom code. Cannot be
777 used in combination with "relation".
778
779 "relation"
780 Name of the table or sequence with which to associate the custom
781 code. Cannot be used in combination with "sync".
782
783 "status"
784 The current status of this customcode. Anything other than "active"
785 means the code is not run.
786
787 "priority"
788 Number indicating the priority in which order to execute custom
789 codes. Lower numbers are higher priority. Useful for subroutines
790 that set "lastcode" in order to cancel the execution of subsequent
791 custom codes for the same "when_run".
792
793 "src_code"
794 File from which to read the custom code Perl source.
795
796 The body of the Perl subroutine should be implemented in the "src_code"
797 file, and not inside a "sub" declaration. When called, it will be
798 passed a single hash reference with the following keys:
799
800 "syncname"
801 The name of the currently-executing sync.
802
803 "version"
804 The version of Bucardo executing the sync.
805
806 "sourcename"
807 The name of the source database.
808
809 "targetname"
810 The name of the target database.
811
812 "sendmail"
813 A code reference that can be used to send email messages.
814
815 "sourcedbh"
816 A DBI database handle to the sync source database. Provided only to
817 custom code executed by the controller.
818
819 "rellist"
820 An array reference of hash references, each representing a relation
821 in the sync. Provided only to custom code executed by the
822 controller. The keys in the hash are the same as the parameters
823 supported by "add table" and "add sequence", as appropriate.
824
825 "schemaname"
826 The schema for the table that triggered the exception. Provided
827 only to "exception" custom codes.
828
829 "tablename"
830 The name of the table that triggered the exception. Provided only
831 to "exception" custom codes.
832
833 "error_string"
834 The string containing the actual error message. Provided only to
835 "exception" custom codes.
836
837 "deltabin"
838 A hash reference with the name of each source database as a key and
839 a list of all primary keys joined together with "\0". Provided only
840 to "exception" custom codes.
841
842 "attempts"
843 The number of times the sync has been attempted. Provided only to
844 "exception" custom codes.
845
846 "conflicts"
847 A hash reference of conflicting rows. The keys are the primary key
848 values, and the values are hash references with the names of the
849 databases containing the conflicting rows and true values. Provided
850 only to "conflict" custom codes.
851
852 The custom code subroutine may set any of these keys in the hash
853 reference to change the behavior of the sync:
854
855 "message"
856 Message to send to the logs.
857
858 "warning"
859 A warning to emit after the subroutine has returned.
860
861 "error"
862 An error to be thrown after the subroutine has returned.
863
864 "nextcode"
865 Set to send execution to the next custom code of the same type.
866 Mainly useful to exception custom codes, and supported only by
867 custom codes executed by the controller.
868
869 "lastcode"
870 Set to true to have any subsequent custom codes of the same type to
871 be skipped.
872
873 "endsync"
874 Cancels the sync altogether.
875
876 An example:
877
878 use strict;
879 use warnings;
880 use Data::Dumper;
881
882 my $info = shift;
883
884 # Let's open a file.
885 my $file = '/tmp/bucardo_dump.txt';
886 open my $fh, '>:encoding(UTF-8)', $file or do {
887 $info->{warning} = "Cannot open $file: $!\n";
888 return;
889 };
890
891 # Inspect $info for fun.
892 print $fh Dumper $info;
893 close $fh or $info->{warning} = "Error closing $file: $!\n";
894
895 # Log a message and return.
896 $info->{message} = 'IN UR DATABASEZ NORMALIZIN UR RELAYSHUNS';
897 return;
898
899 update
900 bucardo update <type> <name> <parameters>
901
902 Updates a Bucardo object. The "type" specifies the type of object to
903 update, while the "name" should be the name of the object. The
904 supported parameters for each type are the same as those for "add". The
905 supported types are:
906
907 "customcode"
908 "db"
909 "sync"
910 "table"
911 "sequence"
912
913 update customcode
914
915 bucardo update customcode <name> setting=value
916
917 Updates an existing customcode. Items that can be changed are:
918
919 "about"
920 A short description of the custom code.
921
922 "getdbh"
923 Boolean indicating whether or not Perl DBI database handles should
924 be provided to the custom code subroutine. If true, database
925 handles will be provided under the "dbh" key of the hash reference
926 passed to the subroutine. The value under this key will be a hash
927 reference mapping database names to their respective handles.
928
929 "name"
930 The name of the custom code object.
931
932 "priority"
933 Number indicating the priority in which order to execute custom
934 codes. Lower numbers are higher priority. Useful for subroutines
935 that set "lastcode" in order to cancel the execution of subsequent
936 custom codes for the same "when_run".
937
938 "src_code"
939 File from which to read the custom code Perl source.
940
941 "status"
942 The current status of this customcode. Anything other than "active"
943 means the code is not run.
944
945 "whenrun"
946 A string indicating when the custom code should be run. Supported
947 values include:
948
949 "before_txn"
950 "before_check_rows"
951 "before_trigger_drop"
952 "after_trigger_drop"
953 "after_table_sync"
954 "exception"
955 "conflict"
956 "before_trigger_enable"
957 "after_trigger_enable"
958 "after_txn"
959 "before_sync"
960 "after_sync"
961
962 update db
963
964 bucardo udpate db <name> port=xxx host=xxx user=xxx pass=xxx
965
966 Updates a database. The "name" is the name by which the database is
967 known to Bucardo. This may vary from the actual database name, as
968 multiple hosts might have databases with the same name.
969
970 The supported named parameters are:
971
972 "dbname"
973 "db"
974 The actual name of the database.
975
976 "type"
977 "dbtype"
978 The type of the database. Currently supported values are:
979
980 · "postgres"
981
982 · "drizzle"
983
984 · "mongo"
985
986 · "mysql"
987
988 · "maria"
989
990 · "oracle"
991
992 · "redis"
993
994 · "sqlite"
995
996 "username"
997 "dbuser"
998 "dbdsn"
999 A direct DSN to connect to a database. Will override all other
1000 connection options if set.
1001
1002 "user"
1003 The username Bucardo should use to connect to the database.
1004
1005 "password"
1006 "dbpass"
1007 "pass"
1008 The password Bucardo should use when connecting to the database.
1009
1010 "dbhost"
1011 "pghost"
1012 "host"
1013 The host name to which to connect.
1014
1015 "dbport"
1016 "pgport"
1017 "port"
1018 The port to which to connect.
1019
1020 "dbconn"
1021 "pgconn"
1022 "conn"
1023 Additional connection parameters, e.g., "sslmode=require".
1024 Optional.
1025
1026 "status"
1027 Status of the database in Bucardo. Must be either "active" or
1028 "inactive".
1029
1030 "dbgroup"
1031 "server_side_prepares"
1032 "ssp"
1033 Enable or disable server-side prepares. Pass 1 to enable them or 0
1034 to disable them.
1035
1036 "makedelta"
1037 Enable or disable makedelta for this database.
1038
1039 "dbservice"
1040 "service"
1041 The service name to use for a Postgres database.
1042
1043 "dbgroup"
1044 A comma-separated list of dbgroups to which to add the database.
1045 The database will be removed from any other dbgroups of which it
1046 was previously a member.
1047
1048 update sync
1049
1050 bucardo update sync syncname relgroup=xxx dbs=xxx
1051
1052 Updates a sync, which is a named replication event containing
1053 information about what to replicate from where to where. The supported
1054 parameters are:
1055
1056 "name"
1057 The name of the sync. Required.
1058
1059 "dbs"
1060 The name of a dbgroup or comma-delimited list of databases.
1061
1062 "relgroup"
1063 The name of a relgroup to synchronize.
1064
1065 "status"
1066 Indicates whether or not the sync is active. Must be either
1067 "active" or "inactive". Note that this will not change the current
1068 run status of the sync, just mark whether it should be active or
1069 inactive on the next reload. Use the "activate sync" and
1070 <deactivate sync> commands to actually activate or deactivate a
1071 sync.
1072
1073 "rebuild_index"
1074 Boolean indicating whether or not to rebuild indexes after every
1075 sync.
1076
1077 "lifetime"
1078 Number of seconds a KID can live before being reaped.
1079
1080 "maxkicks"
1081 Number of times a KID may be kicked before being reaped.
1082
1083 "isolation_level"
1084 The transaction isolation level this sync should use. Only choices
1085 are "serializable" and "repeatable read"
1086
1087 "conflict_strategy"
1088 The conflict resolution strategy to use in the sync. Supported
1089 values:
1090
1091 "bucardo_source"
1092 The rows on the "source" database always "win". In other words,
1093 in a conflict, Bucardo copies rows from source to target.
1094
1095 "bucardo_target"
1096 The rows on the "target" database always win.
1097
1098 "bucardo_latest"
1099 The row that was most recently changed wins.
1100
1101 "bucardo_abort"
1102 The sync is aborted on a conflict.
1103
1104 "onetimecopy"
1105 Determines whether or not a sync should switch to a full copy mode
1106 for a single run. Supported values are:
1107
1108 0: off
1109 1: always full copy
1110 2: only copy tables that are empty on the target
1111 "stayalive"
1112 Boolean indicating whether or not the sync processes (CTL) should
1113 be persistent.
1114
1115 "kidsalive"
1116 Boolean indicating whether or not the sync child processes (KID)
1117 should be persistent.
1118
1119 "autokick"
1120 Boolean indicating whether or not tables in the sync should
1121 automatically send kick messages when they're modified. May be
1122 overridden by the "autokick" parameter of individual tables.
1123
1124 "checktime"
1125 An interval specifying the maximum time a sync should go before
1126 being kicked. Useful for busy systems where you don't want the
1127 overhead of notify triggers.
1128
1129 "priority"
1130 An integer indicating the priority of the sync. Lower numbers are
1131 higher priority. Currently used only for display purposes.
1132
1133 "analyze_after_copy"
1134 Boolean indicating whether or not to analyze tables after every
1135 sync. Off by default.
1136
1137 "overdue"
1138 An interval specifying the amount of time after which the sync has
1139 not run that it should be considered overdue. "check_bucardo_sync"
1140 issues a warning when a sync has not been run in this amount of
1141 time.
1142
1143 "expired"
1144 An interval specifying the amount of time after which the sync has
1145 not run that it should be considered expired. "check_bucardo_sync"
1146 issues a critical message when a sync has not been run in this
1147 amount of time.
1148
1149 "track_rates"
1150 Boolean indicating whether or not to track synchronization rates.
1151
1152 "rebuild_index"
1153 Boolean indicating whether or not to rebuild indexes after every
1154 sync.
1155
1156 "strict_checking"
1157 Boolean indicating whether or not to be strict when comparing
1158 tables in the sync. If the columns have different names or data
1159 types, the validation will fail. But perhaps the columns are
1160 allowed to have different names or data types. If so, disable
1161 "strict_checking" and column differences will result in warnings
1162 rather than failing the validation. Defaults to true.
1163
1164 update table
1165
1166 bucardo update table [schema].table db=actual_db_name
1167
1168 Updates a table object. The table information will be read from the
1169 specified database. Supported parameters:
1170
1171 "db"
1172 The name of the database from which to read the table information.
1173 Should be a name known to Bucardo.
1174
1175 "schemaname"
1176 The name of the schema in which the table is found.
1177
1178 "tablename"
1179 The actual name of the table.
1180
1181 "autokick"
1182 Boolean indicating whether or not the table should automatically
1183 send kick messages when it's modified. Overrides the "autokick"
1184 parameter of any syncs of which the table is a part.
1185
1186 "rebuild_index"
1187 Boolean indicating whether or not to rebuild indexes after every
1188 sync.
1189
1190 "analyze_after_copy"
1191 Boolean indicating whether or not to analyze the table after every
1192 sync.
1193
1194 "vacuum_after_copy"
1195 Boolean indicating whether or not to vacuum the table after every
1196 sync.
1197
1198 "relgroup"
1199 Adds the table to the named relgroup. May be specified more than
1200 once. The table will be removed from any other relgroups.
1201
1202 "makedelta"
1203 Specifies which databases need makedelta enabled for this table.
1204
1205 "strict_checking"
1206 Boolean indicating whether or not to be strict when comparing the
1207 table between syncs. If the columns have different names or data
1208 types, the validation will fail. But perhaps the columns are
1209 allowed to have different names or data types. If so, disable
1210 "strict_checking" and column differences will result in warnings
1211 rather than failing the validation. Defaults to true.
1212
1213 update sequence
1214
1215 bucardo update sequence [schema].sequence relgroup=xxx
1216
1217 "db"
1218 The name of the database where the sequence lives.
1219
1220 "schemaname"
1221 The name of the schema in which the sequence is found.
1222
1223 "relgroup"
1224 Adds the sequence to the named relgroup. May be speci<fied more
1225 than once. The sequence will be removed from any other relgroups.
1226
1227 remove
1228 bucardo remove <item_type> <item_name>
1229
1230 Removes one or more objects from Bucardo. Valid item types are;
1231
1232 · "db" or "database"
1233
1234 Use the "--force" option to clear out related tables and groups
1235 instead of erroring out.
1236
1237 · "dbgroup"
1238
1239 · "relgroup"
1240
1241 · "sync"
1242
1243 · "table"
1244
1245 · "sequence"
1246
1247 · "customcols"
1248
1249 · "customname"
1250
1251 · "customcode"
1252
1253 kick
1254 bucardo kick <syncname(s)> [timeout]
1255
1256 Tells one or more named syncs to fire as soon as possible. Note that
1257 this simply sends a request that the sync fire: it may not start right
1258 away if the same sync is already running, or if the source or target
1259 database has exceeded the number of allowed Bucardo connections. If the
1260 final argument is a number, it is treated as a timeout. If this number
1261 is zero, the bucardo command will not return until the sync has
1262 finished. For any other number, the sync will wait at most that number
1263 of seconds. If any sync has not finished before the timeout, an exit
1264 value of 1 will be returned. Errors will cause exit values of 2 or 3.
1265 In all other cases, an exit value of 0 will be returned.
1266
1267 If a timeout is given, the total completion time in seconds is also
1268 displayed. If the sync is going to multiple targets, the time that each
1269 target takes from the start of the kick is also shown as each target
1270 finishes. Options:
1271
1272 "--retry"
1273 The number of times to retry a sync if it fails. Defaults to 0.
1274
1275 "--retry-sleep"
1276 How long to sleep, in seconds, between each retry attempt.
1277
1278 "--notimer"
1279 By default, kicks with a timeout argument give a running real-time
1280 summary of time elapsed by using the backspace character. This may
1281 not be wanted if running a kick, for example, via a cronjob, so
1282 turning --notimer on will simply print the entire message without
1283 backspaces.
1284
1285 pause
1286 bucardo pause <syncname(s)>
1287 bucardo pause all
1288 bucardo resume <syncname(s)>
1289 bucardo resume all
1290
1291 Tells one or more named syncs to temporarily pause, or to resume from a
1292 previous pause. This only applies to active syncs and only takes effect
1293 if Bucardo is currently running. The keyword 'all' can be used as well
1294 to pause or resume all known active syncs.
1295
1296 reload config
1297 bucardo reload config
1298 bucardo reload config 30
1299
1300 Sends a message to all CTL and KID processes asking them to reload the
1301 Bucardo configuration. This configuration is a series of key/value
1302 pairs that configure Bucardo's behavior, and not any of the objects
1303 managed by the "add", "remove", or "update" commands.
1304
1305 By default, Bucardo will send the message and then exit. Pass an
1306 optional number and Bucardo will instead wait up to that length of time
1307 for all child processes to report completion.
1308
1309 set
1310 bucardo set setting1=value [setting2=value]
1311
1312 Sets one or more configuration setting table. Setting names are case-
1313 insensitive. The available settings are:
1314
1315 "autosync_ddl"
1316 Which DDL changing conditions do we try to remedy automatically?
1317 Default: "newcol".
1318
1319 "bucardo_version"
1320 Current version of Bucardo. Default: 5.6.0.
1321
1322 "bucardo_vac"
1323 Do we want the automatic VAC daemon to run? Default: 1.
1324
1325 "bucardo_initial_version"
1326 Bucardo version this schema was created with. Default: 5.6.0.
1327
1328 "ctl_checkonkids_time"
1329 How often does the controller check on the kids health? Default:
1330 10.
1331
1332 "ctl_createkid_time"
1333 How long do we sleep to allow kids-on-demand to get on their feet?
1334 Default: 0.5.
1335
1336 "ctl_sleep"
1337 How long does the controller loop sleep? Default: 0.2.
1338
1339 "default_conflict_strategy"
1340 Default conflict strategy for all syncs. Default: "bucardo_latest".
1341
1342 "default_email_from"
1343 Who the alert emails are sent as. Default: "nobody@example.com".
1344
1345 "default_email_host"
1346 Which host to send email through. Default: "localhost".
1347
1348 "default_email_to"
1349 Who to send alert emails to. Default: "nobody@example.com".
1350
1351 "email_debug_file"
1352 File to save a copy of all outgoing emails to. Default: None.
1353
1354 "endsync_sleep"
1355 How long do we sleep when custom code requests an endsync? Default:
1356 1.0.
1357
1358 "flatfile_dir"
1359 Directory to store the flatfile output inside of. Default: ".".
1360
1361 "host_safety_check"
1362 Regex to make sure we don't accidentally run where we should not.
1363 Default: None.
1364
1365 "isolation_level"
1366 The transaction isolation level all sync should use. Defaults to
1367 'serializable'. The only other valid option is 'repeatable read'
1368
1369 "kid_deadlock_sleep"
1370 How long to sleep in seconds if we hit a deadlock error. Default:
1371 0.5. Set to -1 to prevent the kid from retrying.
1372
1373 "kid_nodeltarows_sleep"
1374 How long do kids sleep if no delta rows are found? Default: 0.5.
1375
1376 "kid_pingtime"
1377 How often do we ping check the KID? Default: 60.
1378
1379 "kid_restart_sleep"
1380 How long to sleep in seconds when restarting a kid? Default: 1.
1381
1382 "kid_serial_sleep"
1383 How long to sleep in seconds if we hit a serialization error.
1384 Default: 0.5. Set to -1 to prevent the kid from retrying.
1385
1386 "kid_sleep"
1387 How long does a kid loop sleep? Default: 0.5.
1388
1389 "log_conflict_file"
1390 Name of the conflict detail log file. Default:
1391 "bucardo_conflict.log".
1392
1393 "log_level"
1394 How verbose to make the logging. Higher is more verbose. Default:
1395 "normal".
1396
1397 "log_microsecond"
1398 Show microsecond output in the timestamps? Default: 0.
1399
1400 "log_showlevel"
1401 Show log level in the log output? Default: 0.
1402
1403 "log_showline"
1404 Show line number in the log output? Default: 0.
1405
1406 "log_showpid"
1407 Show PID in the log output? Default: 1.
1408
1409 "log_showtime"
1410 Show timestamp in the log output? 0=off 1=seconds since epoch
1411 2=scalar gmtime 3=scalar localtime. Default: 3.
1412
1413 "log_timer_format"
1414 The "strftime" format to use to format the log timestamp when
1415 "log_showtime" is set to 2 or 3. Defaults to simply the scalar
1416 output of the time.
1417
1418 "mcp_dbproblem_sleep"
1419 How many seconds to sleep before trying to respawn. Default: 15.
1420
1421 "mcp_loop_sleep"
1422 How long does the main MCP daemon sleep between loops? Default:
1423 0.2.
1424
1425 "mcp_pingtime"
1426 How often do we ping check the MCP? Default: 60.
1427
1428 "mcp_vactime"
1429 How often in seconds do we check that a VAC is still running?
1430 Default: 60.
1431
1432 "piddir"
1433 Directory holding Bucardo PID files. Default: "/var/run/bucardo".
1434
1435 "reason_file"
1436 File to hold reasons for stopping and starting. Default:
1437 "bucardo.restart.reason.txt".
1438
1439 "reload_config_timeout"
1440 Number of seconds the "reload_config" command should wait for the
1441 reload to complete. Default: 30.
1442
1443 "semaphore_table"
1444 Table to let apps know a sync is ongoing. Default:
1445 "bucardo_status".
1446
1447 "statement_chunk_size"
1448 How many primary keys to shove into a single statement. Default:
1449 10000.
1450
1451 "stats_script_url"
1452 Location of the stats script. Default: "http://www.bucardo.org/".
1453
1454 "stopfile"
1455 Name of the semaphore file used to stop Bucardo processes. Default:
1456 "fullstopbucardo".
1457
1458 "syslog_facility"
1459 Which syslog facility level to use. Default: "log_local1".
1460
1461 "tcp_keepalives_count"
1462 How many probes to send. 0 indicates sticking with system defaults.
1463 Default: 0.
1464
1465 "tcp_keepalives_idle"
1466 How long to wait between each keepalive probe. Default: 0.
1467
1468 "tcp_keepalives_interval"
1469 How long to wait for a response to a keepalive probe. Default: 0.
1470
1471 "vac_run"
1472 How often does the VAC process run? Default: 30.
1473
1474 "vac_sleep"
1475 How long does VAC process sleep between runs? Default: 120.
1476
1477 "warning_file"
1478 File containing all log lines starting with "Warning". Default:
1479 "bucardo.warning.log".
1480
1481 show
1482 bucardo show all|changed|<setting> [<setting>...]
1483
1484 Shows the current Bucardo settings. Use the keyword "all" to see all
1485 the settings, "changed" to see settings different than the installed
1486 defaults, or specify one or more search terms. See "set" for complete
1487 details on the configuration settings.
1488
1489 config
1490 bucardo config show all|<setting> [<setting>...]
1491 bucardo config set <setting=value> [<setting=value>...]
1492
1493 Deprecated interface for showing and setting configuration settings.
1494 Use the "show" and "set" commands, instead.
1495
1496 ping
1497 bucardo ping
1498 bucardo ping 60
1499 bucardo ping 0
1500
1501 Sends a ping notice to the MCP process to see if it will respond. By
1502 default, it will wait 15 seconds. A numeric argument will change this
1503 timeout. Using a 0 as the timeout indicates waiting forever. If a
1504 response was returned, the program will exit with a value of 0. If it
1505 times out, the value will be 1. Returns a Nagios like message starting
1506 with "OK" or "CRITICAL" for success or failure.
1507
1508 status
1509 bucardo status [syncname(s)] [--sort=#] [--show-days] [--compress]
1510
1511 Shows the brief status of all known syncs in a tabular format. If given
1512 one or more sync names, shows detailed information for each one. To see
1513 detailed information for all syncs, simply use "status all"
1514
1515 When showing brief information, the columns are:
1516
1517 1. Name
1518 The name of the sync
1519
1520 2. State
1521 The state of the sync. Can be 'Good', 'Bad', 'Empty', 'No records
1522 found', 'Unknown', or the run state for a currently-running sync.
1523
1524 3. Last good
1525 When the sync last successfully ran.
1526
1527 4. Time
1528 How long it has been since the last sync success
1529
1530 5. Last I/U
1531 The number of insert and deletes performed by the last successful
1532 sync. May also show the number of rows truncated (T) or conflicted
1533 (C), if applicable.
1534
1535 6. Last bad
1536 When the sync last failed.
1537
1538 7. Time
1539 How long it has been since the last sync failure
1540
1541 The options for "status" are:
1542
1543 "--show-days"
1544 Specifies whether or not do list the time interval with days, or
1545 simply show the hours. For example, "3d 12h 6m 3s" vs. "48h 6m 3s"
1546
1547 "--compress"
1548 Specifies whether or not to compress the time interval by removing
1549 spaces. Mostly used to limit the width of the 'status' display.
1550
1551 "--sort=#"
1552 Requests sorting of the 'status' output by one of the nine columns.
1553 Use a negative number to reverse the sort order.
1554
1555 activate
1556 bucardo activate syncname [syncname2 syncname3 ...] [timeout]
1557
1558 Activates one or more named syncs. If given a timeout argument, it will
1559 wait until it has received confirmation from Bucardo that each sync has
1560 been successfully activated.
1561
1562 deactivate
1563 bucardo deactivate syncname [syncname2 syncname3 ...] [timeout]
1564
1565 Deactivates one or more named syncs. If given a timeout argument, it
1566 will wait until it has received confirmation from Bucardo that the sync
1567 has been successfully deactivated.
1568
1569 message
1570 bucardo message 'I WAS HERE'
1571
1572 Sends a message to the running Bucardo logs. This message will appear
1573 prefixed with "MESSAGE: ". If Bucardo is not running, the message will
1574 go to the logs the next time Bucardo runs and someone adds another
1575 message.
1576
1577 reload
1578 bucardo reload [syncname2 syncname3 ...]
1579
1580 Sends a message to one or more sync processes, instructing them to
1581 reload. Waits for each to reload before going on to the next.
1582 Reloading consists of deactivating a sync, reloading its information
1583 from the database, and activating it again.
1584
1585 inspect
1586 bucardo inspect <type> <name> [<name2>...]
1587
1588 Inspects one or more objects of a particular type. The results are sent
1589 to "STDOUT". The supported types include:
1590
1591 "table"
1592 "sync"
1593 "relgroup"
1594
1595 validate
1596 bucardo validate all|<sync> [<sync>...]
1597
1598 Validates one or more syncs. Use the keyword "all" to validate all
1599 syncs, or specify one or more syncs to validate.
1600
1601 Note that this command executes a subset of all the validation done
1602 when a sync is started or activated.
1603
1604 purge
1605 bucardo purge all|<table> [<table>...]
1606
1607 Purges the delta and track tables for one or more tables, for one or
1608 more databases. Use the keyword "all" to validate all tables, or
1609 specify one or more tables to validate.
1610
1611 delta
1612 bucardo delta [total] [<database>...]
1613
1614 Show the current delta count for each source target. Provide a list of
1615 databases to limit it to just the given ones. Wildcards are allowed.
1616 Use the special name "totals" to show only the grand total.
1617
1618 help
1619 bucardo help
1620 bucardo help <command>
1621 bucardo help <command> <action>
1622
1623 Get help. General help can be returned, as well as help for a single
1624 command or a command and its action. Some examples:
1625
1626 bucard help list
1627 bucard help add table
1628
1630 It is usually easier to set most of these options at the top of the
1631 script, or make an alias for them, as they will not change very often
1632 if at all.
1633
1634 "-d"
1635 "--db-name"
1636 bucardo --db-name widgets
1637 bucardo -d bricolage
1638
1639 Name of the Bucardo database to which to connect.
1640
1641 "-U"
1642 "--db-user"
1643 bucardo --db-user postgres
1644 bucardo -U Mom
1645
1646 User name to use when connecting to the Bucardo database.
1647
1648 "-P"
1649 "--db-pass"
1650 bucardo --db-pass s3cr1t
1651 bucardo -P lolz
1652
1653 Password to use when connecting to the Bucardo database.
1654
1655 "-h"
1656 "--db-host"
1657 bucardo --db-host db.example.com
1658 bucardo -h db2.example.net
1659
1660 Host name to use when connecting to the Bucardo database.
1661
1662 "-p"
1663 "--db-port"
1664 bucardo --db-port 7654
1665
1666 Port number to connect to when connecting to the Bucardo database.
1667
1668 "--bucardorc"
1669 bucardo --bucardorc myrcfile
1670
1671 Use the specified file for configuration instead of the default
1672 ./.bucardorc.
1673
1674 "--no-bucardorc"
1675 Do not use the ./.bucardorc configuration file.
1676
1677 "--verbose"
1678 Makes bucardo run verbosely. Default is off.
1679
1680 "--quiet"
1681 Tells bucardo to be as quiet as possible. Default is off.
1682
1683 "--help"
1684 Shows a brief summary of usage for bucardo.
1685
1687 In addition to command-line configurations, you can put any options
1688 inside of a file. The file .bucardorc in the current directory will be
1689 used if found. If not found, then the file ~/.bucardorc will be used.
1690 Finally, the file /etc/bucardorc will be used if available. The format
1691 of the file is option = value, one per line. Any line starting with a
1692 '#' will be skipped. Any values loaded from a bucardorc file will be
1693 overwritten by command-line options. All bucardorc files can be ignored
1694 by supplying a "--no-bucardorc" argument. A specific file can be forced
1695 with the "--bucardorc=file" option; if this option is set, bucardo will
1696 refuse to run unless that file can be read.
1697
1699 The bucardo script uses $ENV{HOME} to look for a .bucardorc file.
1700
1702 Bug reports and feature requests are always welcome, please visit
1703 bucardo.org <https://bucardo.org>, file GitHub Issues
1704 <http://github.com/bucardo/bucardo/issues>, or post to our email list
1705 <https://bucardo.org/mailman/listinfo/bucardo-general>.
1706
1708 Bucardo
1709
1711 Copyright 2006-2020 Greg Sabino Mullane <greg@turnstep.com>
1712
1713 This program is free to use, subject to the limitations in the LICENSE
1714 file.
1715
1716
1717
1718perl v5.32.0 2020-07-27 BUCARDO(1)