# Transfer tracker to another server

# In which case the tracker is transferred

  1. Frequent critical failures of the current server where the tracker is installed.

  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 tracker for scaling funnels or testing new GEOs.

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

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

  1. Log in to the server via SSH.

  2. Run the tracker installation script

curl keitaro.io/kctl.sh | bash -s -- install
1
  1. After tracker will be installed — run screen
screen
1

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

  1. Start data migration from the old server to the new one with the command.
SSH_PASSWORD="ssh_password" kctl transfer copy-from OLD_SERVER_IP
1

Where ssh_password is the ssh password to old server, OLD_SERVER_IP is the IP address of the old server

If access to the server from which you want to migrate is possible only with a key — upload the key to the new server and run the script

SSH_PATH_TO_KEY="/path/to/my/ssh.private.key" kctl transfer copy-from OLD_SERVER_IP
1

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

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.

TIP

Wait until the kctl transfer script finishes it's working and then start working with the new tracker.

# Database dump process

  1. Log in to the server via SFTP.

  2. Download the file /var/www/keitaro/app/config/config.ini.php and save the data from it: base name and Salt from the configuration file.

  3. Log on to the server via SSH. Run the command:

mysqldump <DB_NAME> | gzip > dump.sql.gz
1

Where <DB_NAME> is the database name from the configuration file (usually keitaro).

  1. Wait for the command to execute. Execution time depends on the size of the database, may take from several minutes to several days.

# Alternative method (deprecated, will stop working soon)

  1. Download dump from current server from directory /var.

  2. Place it in /root directory of the server, where you are going to transfer tracker.

  3. Go to your personal account at keitaro.io and unlink the license from the current IP.

  4. Log in to the new server and run the tracker restoring from dump command:

curl keitaro.io/install.sh | bash  -s -- -R
1
  1. After installation is complete, go to the link provided and enter the license key (having previously untied it from the old IP server in the personal account). Use your old login and password to log in to the tracker

# How to Transfer Landings/Offers to a new Tracker?

This data is transferred manually using aleternative method. All uploaded archives are stored in a lander folder by default var/www/keitaro/lander. After transferring the tracker create a local landing page or a local offer from the admin panel of a new Keitaro. This will create a new folder for uploaded archives with all the necessary permissions. Next, log in to a new server via SFTP and upload your archives from an old tracker to this created folder manually.

# How to Transfer Bot List to a new Tracker?

Copy files from /var/www/keitaro/var/bots to the new server. Do not needed if using actual method of transfering tracker.

# Will Keitaro work if you change the IP in the license?

No, traffic will stop during the day.