Upgrading Qlik Replicate
This section explains how to upgrade an installation of Qlik Replicate. Before upgrading it is strongly recommended to back up the Replicate data directory (or directories when multiple instances are installed).
Upgrade instructions
-
Choose one of the backup methods below.
Method 1:
Stop all Replicate tasks and instances.
Back up the Replicate "data" directory to a location outside the product folder. This method is recommended in most cases. However, if your "data" folder is very large and there is not enough space to back it up, then use Method 2 below.
Method 2:
Issue the following command from the product bin directory:
./repctl.sh [-d data_directory] exportrepository
where [-d data_directory] is the path to the Replicate "data" directory when it's installed in a non-default location.
Information noteThe exportrepository command will create a JSON file named: <data_directory>/imports/Replication_Definition.json -
Run the following command:
[user=username] [group=groupname] [nocredentials=true] [verbose=true|debug=true] [nologin=true] rpm -U[vh] [--prefix dirname] areplicate-<version-build>.x86_64.rpm
Where [--prefix dirname] is only required when Qlik Replicate is installed in a non-default directory.
For additional information on the available command parameters see the table: Linux installation prerequisites and procedures.
-
If you notice an issue with the upgrade, do one of the following depending on which backup method you chose above.
If you chose method 1:
- Stop all Replicate instances.
- Overwrite the "data" directory with the "data" directory that you backed up earlier.
-
Start all Replicate instances.
If you chose method 2:
Issue the following command from the product bin directory:
./repctl.sh [-d data-directory] importrepository json_file=Full path to the exported *.json file
where [-d data_directory] is the path to the Replicate "data" directory when it's installed in a non-default location.
Example:
./repctl.sh -d /opt/mydatadir/ importrepository json_file=/opt/mydatadir/many_tables.json
When upgrading Replicate, all instances will be reinstalled and started, even if they were not running prior to the upgrade.
Resolving Configuration File Conflicts
During an upgrade, if the new version’s repctl.cfg file contains different parameters than the existing file, and the existing file has been modified, you need to manually merge the new configuration file with the existing one.
In such a scenario the upgrade process will:
-
Rename the file from the new version.
The file will be renamed repctl.cfg.rpmnew and installed in <product_dir>/replicate/bin/ (the same directory as the repctl.cfg file).
-
Issue the following warning (assumes the default installation path):
# rpm -Uvh areplicate-version-build.x86_64.rpm
Preparing... ########################################### [100%]
1:areplicate warning:
/opt/attunity/replicate/bin/repctl.cfg created as /opt/attunity/replicate/bin/repctl.cfg.rpmnew
########################################### [100%]
When the configuration files need to be merged, you need to restart each instance manually after merging the files.
To complete the upgrade
- Manually (and cautiously) merge the new parameters in the repctl.cfg.rpmnew file with the existing parameters in the repctl.cfg file. Save the repctl.cfg file.
-
Delete the repctl.cfg.rpmnew file by issuing the following command:
rm -f <product_dir>/bin/repctl.cfg.rpmnew
-
Restart each instance by running the following commands from the <product_dir>/replicate/bin directory:
systemctl start <servicename>
Example:
systemctl start areplicate