Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!

How to Move the Data Directory to a Different 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 Replicate Server

Last Update:

Jul 10, 2024 12:40:58 PM

Updated By:

Dana_Baldwin

Created date:

Jul 28, 2022 6:59:57 PM

The basic idea behind this procedure is that by default, the data repository of Replicate is encrypted by a machine key which is unique for each machine.

This means, you cannot move the data repository to another Replicate server because that server data repository is encrypted by that server’s machine key which is obviously different.

To allow that procedure, you’ll need to re-encrypt the source data repository with a predefined password which is not machine related, and this password can be used on the target machine to access that repository after it is migrated.

The following steps assume that the version of Replicate is the same between both servers.

 

Environment

 

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.

Note: 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, before you set endpoints and tasks on the machine.

Since the Server and UI are using 2 different keys, both keys will need to be updated using the following procedure:

 

  • Assuming both servers are members of the same domain, please make sure you can open the Replicate console with a domain user, otherwise in:

Server->User Permissions

 

Please add a domain user, grant it “Admin” access level, and save the new settings.

Please reopen the console and make sure you can access the console with the credentials of the domain user.

 

The above step is needed because otherwise you won’t have a valid user to open the console on the target machine.

 

  • To set the server repository master key password on the source server, open "as Administrator":

“Attunity Replicate Command line”

Important: For all the repctl commands below, if the data directory is not in the default location, you must specify the full path to the data directory by using the "-d" switch immediately following "repctl" followed by the rest of the command:

repctl -d "YOUR_DATA_DIRECTORY_PATH"

Run the following command to set the Replicate server key:

C:\Program Files\Attunity\Replicate\bin>repctl  setmasterkey master_key_scope=1

master_key=Server_Master_key

[setmasterkey command] Succeeded

 

  • The UI master key password must contain 32 varying characters, you can generate it using the following command:

C:\Program Files\Attunity\Replicate\bin>RepUiCtl.exe utils genpassword

miBqZuBFgOJevgCt9myBqiWYjZKAdnEn

 

Note: you must save this password in a safe place for future use

 

 

Now, you can set the above password using the following command:

 

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

OJevgCt9myBqiWYjZKAdnEn

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

Replicate Control Program completed successfully.

 

  • Restart both services:

AttunityReplicateServer

AttunityReplicateConsole

 

  • Open the console. Since the Master key password has been changed, you’ll need to re-enter the password for each endpoint. Please do that and make sure you can test the connection successfully for each endpoint.

  • On the target machine, please stop both Replicate services, and rename the Data directory.

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

  • On the target Data directory, delete file:

ServiceConfiguration.xml

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.

 

  • On the target machine run the same password set command for the UI:

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

OJevgCt9myBqiWYjZKAdnEn

  • Start both Replicate services and open the console, and make sure tasks can be resumed properly.
Labels (2)
Comments
NakulanR
Partner - Contributor III
Partner - Contributor III

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 - Contributor III
Partner - Contributor III

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

 

Contributors
Version history
Last update:
‎2024-07-10 12:40 PM
Updated by: