Versions Compared

    Key

    • This line was added.
    • This line was removed.
    • Formatting was changed.
    Comment: Published by Scroll Versions from this space and version 7.0-2

    ...

    Warning
    titleMinimum Qube version requirements for a successful data migration

    Only data from Qube schema version 37 (present from 6.10-0 onwards) can be brought forward into Qube 7. If you're upgrading a Qube supervisor from a version prior to 6.10-0, you can upgrade only the schema to version 37; see the second phase of "Step Two: Export MySQL data to .csv"

     

    Warning
    titleEnsure that database_port is commented out (if present) in your supervisor's qb.conf file

    We have seen cases with customers upgrading from Qube 6 to Qube 7 where the supervisor is attempting to connect to the PostgreSQL server on the default port for MySQL. This is due to the database_port being defined in the qb.conf file, but still set to the value for a MySQL server.

    ...

    Table of Contents
    maxLevel1

    ...

    1. Make sure that the MySQL server is running, and that you can connect to it using the mysql client, and that your qube table version is at 37.

      1. If you haven't changed the database administrator user and password, you should be able to do the following on a command prompt to confirm that the MySQL server is running:

        Code Block
        Linux: /usr/bin/mysql -u root -e 'SELECT * FROM qube.tableversion' 
        
        Mac: /usr/local/mysql/bin/mysql -u root -e 'SELECT * FROM qube.tableversion' 
        
        Windows: "C:\Program Files\pfx\qube\mysql\bin\mysql" -u root -e "SELECT * FROM qube.tableversion" 
      2. Make sure that the above command works and returns:

        Code Block
        +---------+
        | version |
        +---------+
        | 37      |
        +---------+
    2. If you get something less than 37 returned by the above command, it means that your current Qube supervisor version is older than 6.10-0, and that you need to update your MySQL database tables first, before you can upgrade the database schema. To do so:

      1. Download the "upgrade_supervisor" program suitable for your supervisor platform from http://repo.pipelinefx.com/downloads/pub/db_migration_tools/

      2. On a command prompt, run the upgrade_supervisor program that you just downloaded. 

        1. On Windows, you will need to unzip the upgrade_supervisor_WIN32-6.1-x64.zip file first, and run the upgrade_supervisor.bat file found in the unzipped folder.
      3. Check that there weren't any critical errors reported by upgrade_supervisor
      4. Check that the version is now indeed updated to 37, by running the mysql -u root -e 'SELECT * FROM qube.tableversion' command again
    3. Choose a destination folder on your supervisor for the MySQL csv files. Make sure that your user and the mysql server process both have write permission to this folder and all its parent folders, and that the volume is sufficiently large. Also note that a faster disk, such as an SSD, will help speed up the export/import process. 

      Tip
      titleOn CentOS 7.x and possibly other Linux distros, create a working directory under /opt and do the export while running as the root user


      Do NOT use /tmp, /var/tmp (/usr/tmp), or any subdirectories under them. These OSs give the MySQL service its own private /tmp and /var/tmp folders, which prevents the mysqldump command from running correctly. Creating a subdirectory under /root does not work either, nor will a subdirectory in any user's home directory, since non-root users home directories are usually mode 700, so the MariaDB server can't access it.

      One approach that doeswork is creating a directory under /opt and opening up the permissions:

      No Format
      sudo mkdir -p /opt/mysql_dump 
      sudo chmod 755 /opt/mysql_dump

      Then, install the export_data_from_mysql.py script from the next step into this directory as the root user, and run the export script as root.

    4. Download the export_data_from_mysql.py script from http://repo.pipelinefx.com/downloads/pub/db_migration_tools/ and copy it into the destination folder.
    5. On a command prompt, go to the destination folder, and run export_data_from_mysql.py. Running it without any argument will create a subfolder in the current directory named "qube_mysqldump" and dump all files into it.

      Code Block
      python export_data_from_mysql.py
      1. You may override the dump subfolder and DB username, password, and mysql install location. Run "export_data_from_mysql.py -h" to see the list of options.

    6. Sit back. This process can take a long time to complete, depending on how many jobs you have on the system. 

    7. Once the process completes, make sure there were no errors reported on the terminal. Also have a look a the dump directory to confirm that there is a subfolder "qube" and a bunch of subfolders like "<number>qube" .

    8. Take a note of the dump directory location, and proceed to the next step, "Upgrade the Supervisor".

    ...