Move Elector to a New Server

High Level Overview

The simplest description is:

  1. Copy database

  2. Run current installer

  3. Update new preferences

  4. Quick Check

Copy Database

The first step is to copy over the existing data.

Pre-Dump Cleanup

This step is optional. Remove any old error records before dumping the database.

delete * from sr_errors;

Dump Database

This can be done using a batch file similar to this: (customize as required for your environment)

dump_db.bat
@echo off :: RUN by passing in the election db name :: Example dump_db election_on :: SETTINGS AND PATHS :: Note: Do not put spaces before the equal signs or variables will fail :: MySQL EXE Path set mysqldumpexe=C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump.exe set dbName=%1 set dbHost=localhost set dbPwd=password echo Using DB Host %dbHost% "%mysqldumpexe%" -u root -p"%dbPwd%" -h %dbHost% --port=3306 "%dbName%" --default-character-set=utf8 --single-transaction --quote-names --max_allowed_packet=100MB --log-error="%dbName%_dumpErrors.txt" --routines -r "%dbName%.sql" echo Dump done!

Copy the Database File

Get the database dump file moved to the new server - the best way you know how.

Create Empty Schema 

// versions before 14.9.4.4 use: CREATE DATABASE IF NOT EXISTS `election_on` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; // version 14.9.4.4 or greater use: CREATE DATABASE IF NOT EXISTS `election_on` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;

Import the Database File

Might be easiest to do this using a MySQL tool like MySQL Workbench. Load the file and be sure to specify the new empty schema as the target.

Install Current Flow software

Now that the data is in place and ready - now you need to install Flow for Elector to work with it. Use the following steps.

Create App Pool in IIS

Each Elector instance should have it's own application pool in IIS to keep them independent of each other.

Run Current Installer

The Flow for Elector installer automatically applies any database updates required to upgrade the old db to the current version.

If there are errors reported - fix them if you can.

Update Flow Preferences

Identify Dissolution Data Sets

Make sure that all the existing election dates are correctly identified as one of:

  • General Election

  • Dissolution

  • By-Election

Auto Error Reporting

If you wish to automatically submit error reports to BL - be sure the system preference is enabled

  • Flow – Configuration – Preferences - Errors > Auto Submit Errors Online

Quick Check

Poke around in Flow a little bit to see if all appears to be working. Specifically check the 

  • Overall Results

  • Riding Summary Results