Message-ID: <349063341.8715.1711696396294.JavaMail.confluence@host3.pipelinefx.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8714_1864359074.1711696396294" ------=_Part_8714_1864359074.1711696396294 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
One of the major feature updates to Qube 7.0 is the switch of the superv= isor's database server from MySQL to PostgreSQL. Accordingly, when upgradin= g from a pre-7.0 version (such as 6.10-0a) to 7.0 or above, there are extra= manual steps that must be taken outside of the Qube Installer (or the RPM/= MSI/PKG installer, if you chose to bypass the QubeInstaller), particularly = if you require that the old data from MySQL be transferred to PostgreSQL. T= his step-by-step document will guide you through the straightforward proces= s.
Upgrading the supervisor and transferring the data is essentially a five= -step process, and the order is critical:
You will want to first stop all current farm activities before doing the= upgrade of the Supervisor. Run the following commands on a command prompt = with a qube administrator account to prevent the supervisor from dispatchin= g jobs, and stop accepting new job submissions from users:
qbadmin supervisor --set stop_activity qbadmin supervisor --set reject_submit=20
You will also want stop= workers from picking up new work. If you want to allow workers= to finish up their current frames, do:
qblock --all=20
If you'd rather stop running jobs immediately, do:
qblock --all --purge=20
Then wait for all activities to stop.
In this step, you'll be using a script that we provide to dump MyS=
QL data to .csv files into a folder on disk.
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.= p>
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:
Linux: /usr/bin/mysql -u root -e 'SELECT * FROM qube.tableversi= on' 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 &= quot;SELECT * FROM qube.tableversion"=20
Make sure that the above command works and returns:
+---------+ | version | +---------+ | 37 | +---------+=20
If you get something less than 37 returned by the above comm= and, it means that your current Qube supervisor version is older t= han 6.10-0, and that you need to update your MySQL database tables first, b= efore you can upgrade the database schema. To do so:
Download the "upgrade_supervisor
&=
quot; program suitable for your supervisor platform from http://repo.pipelinefx.com/downloads/pub/db_migra=
tion_tools/
On a command prompt, run the upgrade_supervisor=
strong> program
that you just downloaded.
=
upgrade_supervisor
. mysql -u root -e 'SELECT * FROM qube.tableversion'
command againChoose a destination folder on your supervisor for the MySQL csv fil= es. 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, su= ch as an SSD, will help speed up the export/import process.
=20export_data_from_mysql.py
script from http://repo.pipe=
linefx.com/downloads/pub/db_migration_tools/ and copy it into the =
destination folder.On a command prompt, go to the destination folder, and run You may override the dump subfolder and DB username, password, and m=
ysql install location. Run "export_data_from_mysql.py
. Running it without any=
argument will create a subfolder in the current directory named "python export_data_from_mysql.py
=20
export_data_from_mysql.py -h=
" to see the list of options.
Sit back. This process can take a long time to complete, depending o= n how many jobs you have on the system.
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 ther=
e is a subfolder "qube
" and a bunch=
of subfolders like "<number>qube
<=
/strong>" .
Proceed with the upgrade of the super= visor software. Using the QubeInstaller is recommen= ded, but you can also run the individual installer packages (RPMs, DEBs, MS= Is, or PKGs), should you choose.
See Upgrading Qube!<= /a> for details, but come back here after upgrading the supervisor software= .
Once you upgrade the supervisor, you are ready to import data into the n= ew PostgreSQL server.
Make sure that PostgreSQL server is running, and accepting connectio= ns:
Linux: /usr/local/pfx/pgsql/bin/psql -p 50055 -d pfx -U qube -c= "SELECT * FROM qube.tableversion" Mac: /Applications/pfx/pgsql/bin/psql -p 50055 -d pfx -U qube -c "SELE= CT * FROM qube.tableversion" Windows: "C:\Program Files\pfx\pgsql\bin\psql" -p 50055 -d pfx -U= qube -c "SELECT * FROM qube.tableversion"=20
Note that this should return=
:
version --------- 51 (1 row)=20
Run the import_data_into_pgsql.py
scri=
pt to import data from the csv files that were generated earlier.
Linux: python /usr/local/pfx/qube/utils/pgsql/import_data_= into_pgsql.py Mac: python /Applications/pfx/qube/utils/pgsql/import_data_into_pgsql.= py Windows: python "C:\Program Files\pfx\qube\utils\pgsql\import_dat= a_into_pgsql.py=20
Run the following commands to enable the new supervisor to accept new jo= bs and start dispatching jobs to workers
qbadmin supervisor --unset stop_activity qbadmin supervisor --unset reject_submit=20
You'll also need to unlock the workers you want to start using again. If= you'd like to unlock all workers, then do:
qbunlock --all=20
Congratulations, you are done. Enjoy the new ride!