Traffic Ops - Migrating from 1.x to 2.x

In Traffic Ops 2.x the database used to store CDN information was changed from MySQL to PostgreSQL. PostgreSQL will remain the Traffic Ops database for the foreseeable future. A Docker-based migration tool was developed to help with the conversion process using an open-source PostgreSQL tool called pgloader. The following instructions will help configuring the Migration tool

System Requirements

The user must have the following for a successful minimal install:

Setup the traffic_ops_db Directory

  1. Modify the permissions of the /opt directory to make it writable by and owned by the postgres user and the postgres group. This can easily be accomplished by running the command chmod 755 /opt as the root user, or with sudo.

  2. Download the Traffic Control 2.0.0 tarball like so

    cd /opt
    wget https://dist.apache.org/repos/dist/release/incubator/trafficcontrol/<tarball_version>
    
  3. Extract the only the traffic_ops_db directory to /opt/traffic_ops_db

    tar -zxvf trafficcontrol-incubating-<version>.tar.gz --strip=1 trafficcontrol-incubating-<version>/traffic_ops_db
    chown -R postgres:postgres /opt/traffic_ops_db
    

Migration Preparation

Be sure there is connectivity between your MySQL server’s IP address/port and your PostgreSQL server’s IP address/port.