replace_node
Replaces an existing database node with a new node on a different host.
Replaces an existing database node with a new node on a different host. This command can be used to recover from a node failure or to migrate a node to another host. It is recommended to back up the database before running replace_node.
Syntax
vcluster replace_node options
Required options
--new-hoststring- The host that will replace the old host.
--original-hoststring- The original node being replaced.
Options
--ca-cert-filestring- The path to the trusted CA certificate file.
Default:
/opt/vertica/config/https_certs/rootca.pem
--cert-filestring- The absolute path to the certificate file. If you specify this option, you must also specify
--key-file. You should only use--cert-fileand--key-fileif you have configured the Node Management Agent (NMA) to use custom certificates.
{ -c | --config }string- The path to the configuration file. If a configuration file is present in the default location (automatically generated by
create_db), you do not need to specify this option.Default:
/opt/vertica/config/vertica_cluster.yaml
--data-pathstring- The absolute path to the data directory. This should be the same for all nodes in the database.
{ -d | --db-name }string- The name of the database. You should only use this option if you want to override the database name in your configuration file. This string must conform to the format used for database names.
--depot-pathstring- [Eon only] The absolute path to depot directory.
--existing-hosts-portsstring[,...]- A comma-separated list of node_address=port pairs to specify custom client ports for different nodes in the database.
{ -h | --help }- Prints help text.
--hostsstrings- A comma-separated list of hosts in the database.
--ipv6- Specifies if the hosts use IPv6 addresses.
Default:
IPv4
--is-numa- Indicates whether the database is configured with NUMA architecture.
--key-filestring- Path to the key file. If you specify this option, you must also specify
--cert-file. You should only use--cert-fileand--key-fileif you have configured the Node Management Agent (NMA) to use custom certificates.
{ -l | --log-path }string- The absolute path for debug logs.
Default:
/opt/vertica/log/vcluster.log
{ -p | --password }string- The database password.
--password-filestring- The absolute path to a file containing the database password.
If you pass a dash(-) (that is, `--password-file -`), the password is read from STDIN.
Important
Your database password cannot include single quotes.
--read-password-from-prompt- Prompts the user to enter the password.
--sandboxstring- Specifies the name of the sandbox. Required when the original host belongs to a sandbox.
--timeoutint- The time (in seconds) to wait for nodes to start up. Extend this value to allow additional time (for example, 3600 for one hour).
Default:
300
--tls-modestring- Sets the TLS validation mode. Valid options are
enable,verify-ca,verify-full.Default:
enable
--use-password-for-sql-client-only- Use the password for the NMA SQL client only.
--verbose- Shows the details of VCluster run in the console.
Examples
To replace a database node:
vcluster replace_node --original-host 10.20.30.43 \
--new-host 10.20.30.44
To replace a database node with a database configuration file:
vcluster replace_node --original-host 10.20.30.43 \
--new-host 10.20.30.44 \
--config /opt/vertica/config/vertica_cluster.yaml
To replace a database node in a sandbox:
vcluster replace_node --original-host 10.20.30.43 \
--new-host 10.20.30.44 \
--sandbox sand