Categories

Versions

You are viewing the RapidMiner Server documentation for version 9.0 - Check here for latest version

Upgrading from 7.x to 9.x

RapidMiner 9.x is utilizing a much faster file-based repository. Old repository content will be migrated from database to disk. The length of the migration procedure depends on the repository size.

This section describes updating RapidMiner Server from 7.x to 9.x using the full upgrade. It also describes the process for rolling back the upgrade.

Performing a full upgrade

A full upgrade means installing RapidMiner Server into an empty directory while pointing the database to the existing one.

Stop RapidMiner Server 7.x and perform a backup

  1. Stop RapidMiner Server 7.x. If running Windows, verify that all RapidMiner-related services have stopped.

  2. Back up your RapidMiner Server operations database.

  3. Back up your RapidMiner extensions. If you are unsure of the directory location, check the setting on the Administration > System Settings page. The location is the value defined for the property com.rapidanalytics.plugindir.

Note: It is strongly recommended that you back up the RapidMiner Server operations database before making changes to the software version. Especially as version 9 introduces major changes to the database layout.

Install RapidMiner Server 9.x

  1. Download the latest version of the full server package.

  2. Change to the bin/ directory, within the installation directory, to locate (and then run) the start script (or batch file) for installing the new version of RapidMiner Server software.

Note: It is strongly recommended to use a fresh folder for RapidMiner Server 9.x instead of installing it into an existing RapidMiner Server 7.x folder.

Restore previous configuration

  1. Copy the contents of the backed up extension folder into your extensions directory.

  2. From RapidMiner Server 9 and above all configuration files are stored within the home directory. Instead of editing files within the RapidMiner Server installation folder, you have to re-apply the configuration changes you made to the previous version of RapidMiner Server in the home directory. For example if you modified standalone.xml then manually re-apply the pieces you changed to the new version in
    <home directory>/configuration/standalone.xml too. Do not copy the whole files as it may change from version to version.

Start RapidMiner Server 9.x and perform migration steps

  1. From the new installation folder, start RapidMiner Server.

  2. Log on to RapidMiner Server as admin and perform necessary update steps (e.g. migrate existing queues).

  3. (Optional) Check queue setup and install further Job Agents.

Note: It is advised to migrate all extensions to the extensions folder within the home directory to ease upgrading RapidMiner Server. To do so, update the property com.rapidanalytics.plugindir on the Administration > System Settings page (for example <home directory>/resources/extensions/) once you’ve started the server. You have to copy your old extensions to the new location and restart the server.

Note: If you are using Radoop, make sure you go through the specific installation steps described in the Radoop documentation, as these steps have changed in Server 9.x.

Note: If your extensions are not compatible with the latest RapidMiner Server, you have to replace the old extensions in your extensions folder with new ones you’ve downloaded or extracted. See installing extensions for more information. After you’ve finished upgrading RapidMiner Server, you should verify that all your extensions are loaded, by navigating to the Administration > Operators & Extensions page and comparing the listed extensions with the files residing in your extensions folder.

Rolling back a full upgrade

To roll back an upgrade:

  1. Stop RapidMiner Server. If running Windows, verify that all RapidMiner-related services have stopped.

  2. Restore your RapidMiner Server database from backup. If unsure how to do so, try searching Google for the appropriate commands for your database type.

  3. If you backed up your previous installation directory (because you installed the new version to a directory where an old version existed) then replace the installation directory from backup.

  4. From the previous (old) installation folder, start RapidMiner Server.

Delete old repository content

From RapidMiner 9.x and above all repository contents reside on your filesystem. The migration step which initially copied all data to your filesystem did not delete content from your database intentionally to ensure no data will be lost during the migration. Files stored within databases utilize disk space the same way files would do on your filesystem. In the long term, you don't need the old repository contents which reside in your database because they are also on your disk. If you wish to delete the outdated repository content from the database and free up disk space follow the instructions for your database. Please read through all those instructions carefully before you start.

As the deletion of the old repository content is a destructive operation, we strongly advise to backup the RapidMiner Server database.

Please ensure all migrations ran sucessfully and that you can sign in into your fresh RapidMiner Server 9.x.

Please ensure you execute all statements for your setup as the correct database user in the correct database. If you run the SQL statements below as a different user or within a wrong database not related to RapidMiner Server, data might be lost. Be sure to backup all databases before if you’re unsure.

It’s advised to shutdown RapidMiner Server before starting the deletion of old repository content.

PostgreSQL

If you're using PostgreSQL as database for RapidMiner Server, please execute the following SQL statement as query with the official PostgreSQL tool pgAdmin4.

If you changed the default PostgreSQL schema (defaults to public), please change it in the script by adjusting the variable schema_to_search = 'public' to schema_to_search = 'my_postgres_schema'.

-- adjust "schema_to_search" if you've changed the PSQL SCHEMA with the one you're using on RapidMiner Server
-- clear ExampleSet tables
DO $$
DECLARE
  stmt text;
  table_rec RECORD;
  schema_to_search varchar := 'public';
  prefix_to_search varchar := 'es_%';
  BEGIN
    FOR table_rec IN
    (
         SELECT table_name AS tname
         FROM   information_schema.TABLES
         WHERE  table_schema = schema_to_search
         AND    table_name LIKE prefix_to_search
    )
    LOOP
        raise notice 'Dropping table: %', table_rec.tname;
        EXECUTE 'DROP TABLE IF EXISTS '||table_rec.tname||' CASCADE';
    END LOOP;
END;
$$ LANGUAGE plpgsql;

-- set version table contents to not use ByteBuffers anymore
UPDATE ra_ent_version SET blobbuffer_id = null;
UPDATE ra_ent_version SET ioobjectbuffer_id = null;
UPDATE ra_ent_version SET metadatabuffer_id = null;
UPDATE ra_ent_version SET xmlbuffer_id = null;

-- clear ByteBuffer table contents
DELETE FROM ra_ent_bytebuffer;

Microsoft SQL Server

If you're using Microsoft SQL Server as database for RapidMiner Server please execute the following statement as query with tools like DBeaver or HeidiSQL.

-- clear ExampleSet tables
DECLARE @cmd varchar(4000)
DECLARE cmds CURSOR FOR
SELECT 'drop table [' + Table_Name + ']'
FROM INFORMATION_SCHEMA.TABLES
WHERE Table_Name LIKE 'es_%'

OPEN cmds
WHILE 1 = 1
BEGIN
    FETCH cmds INTO @cmd
    IF @@fetch_status != 0 BREAK
    EXEC(@cmd)
END
CLOSE cmds;
DEALLOCATE cmds

-- set version table contents to not use ByteBuffers anymore
UPDATE ra_ent_version SET blobbuffer_id = null;
UPDATE ra_ent_version SET ioobjectbuffer_id = null;
UPDATE ra_ent_version SET metadatabuffer_id = null;
UPDATE ra_ent_version SET xmlbuffer_id = null;

-- clear ByteBuffer table contents
DELETE FROM ra_ent_bytebuffer;

Oracle

If you're using Oracle SQL as database for RapidMiner Server please execute the following statements sequentially with the official Oracle tool Oracle SQL Developer.

If you're using a custom tablespace name (defaults to SYSTEM), you have to change it in the script by adjusting tablespace_name = 'SYSTEM' to tablespace_name = 'MY_TABLESPACE_NAME'.

To execute the following statements use the run script button.

-- adjust "tablespace_name" with the one you're using on RapidMiner Server
-- create procedure
 CREATE OR REPLACE PROCEDURE REPOMIGRATION AS 
BEGIN
  FOR c IN  (SELECT table_name FROM user_tables WHERE tablespace_name = 'SYSTEM' AND table_name LIKE 'es_'||'%')
  LOOP
    DBMS_OUTPUT.PUT_LINE('Dropping table "'||c.table_name||'"');
    EXECUTE IMMEDIATE 'DROP TABLE "'||c.table_name||'"';
  END LOOP;
END REPOMIGRATION;
BEGIN
    -- clear ExampleSet tables
    REPOMIGRATION();
END;
-- set version table contents to not use ByteBuffers anymore
UPDATE ra_ent_version SET blobbuffer_id = null;
UPDATE ra_ent_version SET ioobjectbuffer_id = null;
UPDATE ra_ent_version SET metadatabuffer_id = null;
UPDATE ra_ent_version SET xmlbuffer_id = null;
-- clear ByteBuffer table contents
DELETE FROM ra_ent_bytebuffer;

If all statements were executed sucessfully, you can delete the created procedure REPOMIGRATION by executing the following statement:

DROP PROCEDURE REPOMIGRATION;

MySQL

If you're using MySQL as database for RapidMiner Server please execute the following statements sequentially with the official MySQL tool MySQL Workbench.

DELIMITER //
-- create procedure
DROP PROCEDURE IF EXISTS printf//
CREATE PROCEDURE printf(txt TEXT)
    BEGIN
        SELECT txt as '';
    END;
   //
DROP PROCEDURE IF EXISTS repoMigration//
CREATE PROCEDURE repoMigration()
    BEGIN
        DECLARE prefix_to_search VARCHAR(255) DEFAULT 'es_%';
        DECLARE table_name VARCHAR(255);
        DECLARE end_of_tables INT DEFAULT 0;
        DECLARE cur CURSOR FOR
            SELECT t.table_name 
            FROM information_schema.tables t 
            WHERE t.table_schema = DATABASE() AND t.table_name LIKE prefix_to_search;
        DECLARE CONTINUE HANDLER FOR NOT FOUND SET end_of_tables = 1;

        call printf(prefix_to_search);

        SET FOREIGN_KEY_CHECKS = 0;
        OPEN cur;

        tables_loop: LOOP
            FETCH cur INTO table_name;

            call printf(table_name);

            IF end_of_tables = 1 THEN
                LEAVE tables_loop;
            END IF;

            SET @s = CONCAT('DROP TABLE IF EXISTS ' , table_name);
            PREPARE stmt FROM @s;
            EXECUTE stmt;

        END LOOP;

        CLOSE cur;
        SET FOREIGN_KEY_CHECKS = 1;
    END;
    //
    DELIMITER ;
-- clear ExampleSet tables
CALL repoMigration();
-- set version table contents to not use ByteBuffers anymore
UPDATE ra_ent_version SET blobbuffer_id = null;
UPDATE ra_ent_version SET ioobjectbuffer_id = null;
UPDATE ra_ent_version SET metadatabuffer_id = null;
UPDATE ra_ent_version SET xmlbuffer_id = null;
-- clear ByteBuffer table contents
DELETE FROM ra_ent_bytebuffer;

If all statements were executed sucessfully, you can delete the created procedures printf and repoMigration by executing the following statement:

DROP PROCEDURE IF EXISTS printf;
DROP PROCEDURE IF EXISTS repoMigration;