Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
Qlik Connect 2025! Join us in Orlando join us for 3 days of immersive learning: REGISTER TODAY

How to move the Data Directory to a different Qlik Replicate Server

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Dana_Baldwin
Support
Support

How to move the Data Directory to a different Qlik Replicate Server

Last Update:

Jan 8, 2025 3:00:37 AM

Updated By:

Sonja_Bauernfeind

Created date:

Jul 28, 2022 6:59:57 PM

The Qlik Replicate data repository is encrypted by a machine key unique to each machine. This means a data directory (data repository) cannot simply be moved to another Qlik Replicate server, as the repository is encrypted by the first Qlik Replicate server's machine key. 

To enable the data directory to be moved, you need to re-encrypt the source data repository with a predefined password not related to the machine. This password can then be used by the target machine to access the repository after the migration. 

The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.

Environment

Re-encrypting the data repository requires you to re-enter the endpoint passwords, therefore we strongly recommend encrypting the repository with a predefined key right after installation and before you set endpoints and tasks on the machine.

Since the Server and UI are using two different keys, both keys will need to be updated using the following procedure. Linux is an exception. It has no separate UI service, meaning Linux implementations can skip the relevant step.

  1. Assuming both servers are members of the same domain, please make sure you can open the Qlik Replicate console with a domain user. Otherwise add a new administrative user through:

    1. Server
    2. User Permissions
    3. Add a domain user and grant it “Admin” level access level
    4. Save the settings
    5. Please reopen the console and make sure you can access the console with the credentials of the domain user

      This step is needed as you will otherwise not have a valid user to open the console on the target machine.

  2. Open a command line with elevated permissions (As Administrator). We will be using repctl commands. 

    Note:

    • The repctl command is accessed from the directory \Attunity\replicate\bin
    • Always run the command lines as Administrator.

    Important: All the following repctl commands are written with the default data directory path assumed. If your data directory is not in the default path, specify full path by using the "-d" switch immediately following "repctl" followed by the rest of the command.

    Example: repctl -d "YOUR_DATA_DIRECTORY_PATH"
  3. Run the following command to set the Qlik Replicate server key value and scope. The scope value of 1 means it can be used on more than just the original server it was installed on: 

    repctl -d replicate_data_folder setmasterkey new_master_key master_key_scope=1

    Where:

    • replicate_data_folder is the shared storage location of the Replicate data folder defined earlier (for example, F:\Replicate\data). Paths with spaces must be enclosed with quotation marks.
    • new_master_key is the new master key

[setmasterkey command] Succeeded will be returned on success. 

  1. Set the UI master key password.

    The UI master key password must contain 32 varying characters. You can generate your own using the following command:
    >C:\Program Files\Attunity\Replicate\bin>RepUiCtl.exe utils genpassword
    Example output: miBqZuBFgOJevgCt9myBqiWYjZKAdnEn
    Safely store the password for later use.
    Now set the password for the UI server using the following command:

    C:\Program Files\Attunity\Replicate\bin>RepUiCtl.exe masterukey set -p miBqZuBFgOJevgCt9myBqiWYjZKAdnEn

    The command will return:

    The master user password has been changed. The change will only take effect after the service is restarted.

    Replicate Control Program completed successfully.

  2. Restart both services: 

    • QlikReplicateServer
    • QlikReplicateConsole

      Note that older versions of Qlik Replicate may still be named Attunity.

  3. Open the console.

    Since the Master key password has been changed, you need to re-enter the password for each endpoint. After changing the password, verify the change by testing the connection for each endpoint. 

  4. On the target machine, stop both Qlik Replicate services, then rename the Data directory.

  5. Copy the data directory from the source to the target machine.

  6. On the target Data directory, delete the file: ServiceConfiguration.xml
    Later versions of Qlik Replicate will not have this file. You can ignore this step if the file is not there.
    This file refers to the source machine name and is not valid on the target machine, starting the services on the target machine will create the file from scratch, matching localhost.

  7. On the target machine run the same password set command for the UI (step 4 only, you do not need to repeat step 3):

    C:\Program Files\Attunity\Replicate\bin>RepUiCtl.exe masterukey set -p miBqZuBFgOJevgCt9myBqiWYjZKAdnEn
  8. Start both Qlik Replicate services, then open the console and verify all tasks can be resumed

 

Troubleshooting

The above steps assume that the version of Qlik Replicate is the same between both servers. If the versions do not match, the following error may be shown at startup after the migration:

Repository 'Global' or one of its ingredients are out of date, please run the following command to upgrade the repository: RepUiCtl.exe repository upgrade --repository <repository_full_path>

The resolve this error:

  1. Open a command prompt with elevated permissions (As Administrator)
  2. Navigate to your bin directory. Example: C:\Program Files\Attunity\Replicate\bin\
  3. Run the following command, adjusting the example to where your actual data directory resides:
    RepUiCtl.exe repository upgrade --repository "D:\Attunity\Replicate\Data\GlobalRepo.sqlite"​
Labels (2)
Comments
NakulanR
Partner - Creator
Partner - Creator

Hi @Dana_Baldwin ,

 

I've tried recreating the above steps but have run into an issue. All the steps were completed without any errors or warnings, however when I open the Replicate console on the target server it still points to the address of the source server.

The one issue of note would be that after deleting the ServiceConfiguration.xml file from the data directory in the target server, restarting the Replicate services didn't generate a new file with the target server machine name. Adding in a ServiceConfiguration.xml file with the target server machine name still caused the UI console to connect to the source server

There is also a "service" Internet Shortcut file whose URL is still set to the source server. Even if this file is deleted and the services are restarted, the URL property of the file still has the source Replicate console address.

Checking the repsrv.log files shows an error saying "Couldn't connect to server (Failed to connect to localhost...." (see below)

err.jpg

Are there more commands that need to be run in order for any reference of the old source server to be removed from the data directory? Or are there any other files that may need to be deleted which may still reference the source machine address?

 

Any feedback/advice is greatly appreciated.

 

Thanks,
Nak

NakulanR
Partner - Creator
Partner - Creator

Hi Support,

 

I managed to resolve the above issue by setting the address of the Replicate instance using the command: repuictl configuration set --address "<target machine address>" as detailed in the following user guide section - Setting up Qlik Replicate UI Server to work with a remote Qlik Replicate Server.

Restarting the services results in the target server address being used when the console is launched.

It should be noted that the endpoint server error "One of more Endpoint Servers cannot be reached" may appear, however that issue can be resolved with the support article found here.

 

Regards,

Nak

 

danielrf
Contributor III
Contributor III

Hi!

Is this method valid in case the servers are linux?

Version history
Last update:
‎2025-01-08 03:00 AM
Updated by: