1<refentry id="repmgr-witness-register"> 2 <indexterm> 3 <primary>repmgr witness register</primary> 4 <seealso>witness server</seealso> 5 </indexterm> 6 7 <refmeta> 8 <refentrytitle>repmgr witness register</refentrytitle> 9 </refmeta> 10 11 <refnamediv> 12 <refname>repmgr witness register</refname> 13 <refpurpose>add a witness node's information to the &repmgr; metadata</refpurpose> 14 </refnamediv> 15 16 <refsect1> 17 <title>Description</title> 18 <para> 19 <command>repmgr witness register</command> adds a witness server's node 20 record to the &repmgr; metadata, and if necessary initialises the witness 21 node by installing the &repmgr; extension and copying the &repmgr; metadata 22 to the witness server. This command needs to be executed to enable 23 use of the witness server with &repmgrd;. 24 </para> 25 <para> 26 When executing <command>repmgr witness register</command>, database connection 27 information for the cluster primary server must also be provided. 28 </para> 29 <para> 30 In most cases it's only necessary to provide the primary's hostname with 31 the <option>-h</option>/<option>--host</option> option; &repmgr; will 32 automatically use the <varname>user</varname> and <varname>dbname</varname> 33 values defined in the <varname>conninfo</varname> string defined in the 34 witness node's <filename>repmgr.conf</filename>, unless these are explicitly 35 provided as command line options. 36 </para> 37 38 <note> 39 <para> 40 The primary server must be registered with <command><link linkend="repmgr-primary-register">repmgr primary register</link></command> before the witness 41 server can be registered. 42 </para> 43 </note> 44 45 <para> 46 Execute with the <option>--dry-run</option> option to check what would happen 47 without actually registering the witness server. 48 </para> 49 </refsect1> 50 <refsect1> 51 <title>Example</title> 52 <para> 53 <programlisting> 54 $ repmgr -f /etc/repmgr.conf witness register -h node1 55 INFO: connecting to witness node "node3" (ID: 3) 56 INFO: connecting to primary node 57 NOTICE: attempting to install extension "repmgr" 58 NOTICE: "repmgr" extension successfully installed 59 INFO: witness registration complete 60 NOTICE: witness node "node3" (ID: 3) successfully registered 61 </programlisting> 62 </para> 63 </refsect1> 64 65 66 67 <refsect1> 68 69 <title>Options</title> 70 <variablelist> 71 72 <varlistentry> 73 <term><option>--dry-run</option></term> 74 <listitem> 75 <para> 76 Check prerequisites but don't actually register the witness 77 </para> 78 </listitem> 79 </varlistentry> 80 81 82 <varlistentry> 83 <term><option>-F</option>/<option>--force</option></term> 84 <listitem> 85 <para> 86 Overwrite an existing node record 87 </para> 88 </listitem> 89 </varlistentry> 90 91 </variablelist> 92 </refsect1> 93 94 <refsect1 id="repmgr-witness-register-events"> 95 <title>Event notifications</title> 96 <para> 97 A <literal>witness_register</literal> <link linkend="event-notifications">event notification</link> will be generated. 98 </para> 99 </refsect1> 100 101</refentry> 102