# Transfer tracker to another server

# In which case the tracker is transferred

  1. Frequent critical failures of the current server on installed tracker.

  2. Unsuitable functionality and pricing system.

  3. Not enough disk space and no possibility to increase it at your current cloud provider.

  4. Need to change the data center of the server and save statistics.

  5. Need to make a duplicate, copy of a tracker for scaling funnels or testing new GEOs.

# The actual method of migrating a tracker version 10 to a new server

TIP

Ensure that the new server matches the characteristics of the current one.

All commands are executed on the server to which you want to migrate.

  1. Log in to the old server via SSH.

  2. Run the dump creation command:

kctl backups create
1
  1. When the dump is created, request the dump name with the command:
ls -1 /var/lib/kctl-backups/common/
1

Copy the dump name and connect via SSH to the new server to perform further actions.

  1. Run the tracker installation command on the new server:
curl keitaro.io/kctl.sh | bash -s -- install
1
  1. Create a common directory for dump:
mkdir -p /var/lib/kctl-backups/common/
1

Processes running inside screen are not terminated when the connection to the server is broken.

  1. Start synchronization of the common directories of the old and new servers:
rsync -avzP -e "ssh -p 22" root@OLD_IP:/var/lib/kctl-backups/common/DUMP_NAME/ /var/lib/kctl-backups/common/DUMP_NAME/
1

Where:

  • 22 is the port number of the old server,
  • OLD_IP — replace with the IP of the old server,
  • DUMP_NAME — the name of the dump from the old server, which was taken in step 3.

Example:

rsync -avzP -e "ssh -p 22" root@77.71.136.233:/var/lib/kctl-backups/common/2025-08-01-13-35-34/ /var/lib/kctl-backups/common/2025-08-01-13-35-34/
1

When prompted, enter the password from the old server in the terminal.

  1. Restore the tracker from the dump with the command:
kctl backups restore
1

All statistics and settings, including local landing pages, offers, user lists of bots, and user agents are transferred automatically.

  1. Go to your account on the website Keitaro.io, tab Licenses, and press Unlink for the license key that you want to bind to the new tracker. Then enter this key when logging in to the new tracker.

WARNING

Do not create campaigns, affiliate networks, and other entities in the new tracker until the migration process is complete. When the migration script finishes, the new tracker will contain only data from the old tracker.

# Creating an archive copy of the tracker locally

Create an archive copy of the tracker locally on the current server. Including MySQL data, ClickHouse data, system settings, local landing pages, salt, Postback key, SSL-certificates, filters, custom bot lists, etc.

  1. Run screen
screen
1

Processes running inside the screen are not interrupted when the connection to the server is lost.

  1. Run the command to create a dump
kctl backups create
1

WARNING

When creating a dump, it is important to pay attention to the terminal output — if there were errors in the process, they could affect the integrity of the dump. In the future, it will not be possible to restore the tracker in full from such a dump.

Data will be saved in /var/lib/kctl-backups/common/ and available for downloading.

# Restoring tracker from an archive local copy

Restore the tracker from the local archive copy on the current server. Including MySQL data, ClickHouse data, system settings, local landing pages, salt, Postback key, SSL-certificates, filters, custom bot lists, etc.

  1. Install the tracker on the server and upload the dump to the directory /var/lib/kctl-backups/common/. If the directory does not exist, you need to create it.

  2. Run the command:

kctl backups restore
1

# Actions after tracker migration

  1. After a successful migration, you must bind the license key to the new server. To do this, first unbind it in your personal account on the keitaro.io website by following these instructions.

  2. Then, to direct traffic to the new server, update the DNS records for all domains by changing the A-record to the new server's IP address. The changes typically take effect within 24 hours.

# FAQ

How to transfer tracker version 10?

Use the instructions for transfer.

How to restore from dump.gz (dump.sql)?

To restore a tracker from a database dump, use the kctl-transfer command with the restore-from-sql local action, for example:

SALT=test kctl-transfers restore-from-sql local path/to/dump.gz
1

On creating a dump in phpmyadmin, the language of the panel must be English.

What does **Could not detect TRACKER_POSTBACK_KEY** mean during migration?

This diagnostic message indicates that there is no custom postback key in the configuration. It can be ignored.