Sync Config.ini
The sync_config_ini.sh script in the <installation_directory>/cluster_utils/ directory, updates the config.ini parameters across all the nodes in the cluster.
For example, if you want to make any changes to the config.ini file, make the changes on the Lead node and then
propagate the change to all the nodes in the cluster using the sync_config_ini.sh script.
- Log in to the co-ordinator node.
- Navigate to the
<installation_directory>/cluster_utils/directory. - To view the arguments for the helper script, run the following command:
./sync_config_ini.sh --help - Press ENTER.
The command lists the arguments for the script.
========================================================================== Usage: ./sync_config_ini.sh [ARGUMENTS]... Examples: ./sync_config_ini.sh \ --hostsfile=</path/to/hosts> \ --ssh-auth-type=publickey \ --private-key-path=</path/to/private_key> ./sync_config_ini.sh \ --hostsfile=</path/to/hosts> \ --ssh-auth-type=password \ --password=<actual_password> Description: * Cluster Utility script to synchronize the protector's config.ini file on current node across the Trino cluster nodes. * This script uses 'pssh' and 'pscp' utilities to replicate the current node's /opt/protegrity/peptrino/data/config.ini file to all other nodes. * Python is required for execution of 'pssh/pscp' and the python executable is searched via '/usr/bin/env python' command. * This script doesn't restart the Trino Servers and it must be done by the user. * It requires a path to Hosts file which contains the IP Address/hostname of all cluster nodes other than the current node on each line. * When the required command line arguments are not passed, it will interactively prompt for them. * Note: This script will only work on clusters where sudoers is enabled. Arguments: --hostsfile=</path/to/hosts> * Path to hosts file. * Each line should contain the IP Address/Hostname of the remaining cluster nodes. * You can optionally include the user to be used by pssh utility by using this syntax: [user@]host[:port] * When no user is written, the current user running the script is used. --ssh-auth-type=<password|publickey> * SSH Authentication Type. * Allowed values: password or publickey * password : for Password based SSH authentication. * publickey : for Public Key Authentication. --password=<actual_password> * Actual password of current user to be passed to pssh utility. * Used along with Password based SSH authentication. --private-key-path=</path/to/privatekeyfile> * Path to SSH private key file to be used by pssh utility. * Used along with Public Key SSH authentication. - To replicate the changes to all the nodes, run the following command:
./sync_config_ini.sh \ --hostsfile=<path_of_the_hosts_file> \ --ssh-auth-type=publickey \ --private-key-path=<key_file_path>/<name_of_the_private_key_file> \ - Press ENTER.
The script creates a backup and then replicates the configuration on all the nodes in the cluster.
========================================================================== Hosts file set to '<path_of_the_hosts_file>' SSH Authentication Type is set to 'Public Key Authentication' SSH Private Key file path is set to '<key_file_path>/<name_of_the_private_key_file>' Checking connectivity of cluster nodes... Trino Protector config.ini cloning started Creating config.ini backup on all nodes... Creating peptrino/data_10-14-2025_12:13:18/ directory on all nodes... Changing ownership of peptrino/data_10-14-2025_12:13:18/ directory recursively on all nodes... Changing permission of peptrino/data_10-14-2025_12:13:18/ on all nodes... Removing original config.ini from all nodes... Removed config.ini from all nodes Copying current node's config.ini to all other nodes... Changing ownership of peptrino/data_10-14-2025_12:13:18/config.ini... Changing permission of peptrino/data_10-14-2025_12:13:18/config.ini... Moving peptrino/data_10-14-2025_12:13:18/config.ini to peptrino/data/... Changing permission of peptrino/data/config.ini... Removing peptrino/data_10-14-2025_12:13:18/ directory and config.ini backup file... Successfully updated Protector config.ini across all cluster nodes. Please restart Trino Server(s) manually to reload new config.ini. The script's logs and operation results are logged in /opt/protegrity/logs/sync_config_ini.log
Feedback
Was this page helpful?