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 [-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.
-
Run the following command:
[user=username] [group=groupname] [nocredentials=true] [verbose=true|debug=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, you can either revert to the previous version as described below or 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:
repctl [-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 -d /opt/mydatadir/ importrepository json_file=/opt/mydatadir/many_tables.json
To revert to a previous version:
- Back up the Replicate "data" directory to a location outside the product folder.
- Uninstall the product and then reinstall to the same directory.
- Once the installation is complete, stop all Replicate instances.
- Overwrite the "data" directory with the "data" directory that you backed up earlier.
- Start all Replicate instances.
When upgrading from a version prior to Replicate 6.1 where the data directory is in a non-default location, you need to add the following parameter to the upgrade command:
data=existing-data-directory
Example (when Replicate is installed in the default installation directory):
data=/opt/mydatadir/ rpm -U[vh] areplicate-6.4.0-102.x86_64.rpm
If the user specified in the original installation has since been deleted, the upgrade will fail.
As in the initial installation, if the new or existing user and/or group is not defined locally (namely, in Active Directory), you must include the nocredentials=true parameter in the command. Otherwise, the upgrade will fail.
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):
[root@bldlinux-rh62 tmp]# 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 in the <product_dir>/replicate/bin directory:
./instancename start
Example:
./areplicate start