migrator

21
Migration Joomla! 1.0 to 1.5 Joomla!Day Bangkok, 2008 Sam Moffatt

Upload: poomjit-sirawongprasert

Post on 12-Nov-2014

453 views

Category:

Documents


1 download

DESCRIPTION

For Joomla Day in Bangkok

TRANSCRIPT

Page 1: migrator

Migration

Joomla! 1.0 to 1.5

Joomla!Day Bangkok, 2008

Sam Moffatt

Page 2: migrator

Presentation name change me in master 2

About Me

Sam Moffatt [ pasamio ] [ [email protected] ]DeveloperMigration ToolJAuthTools

Joined Joomla! after Summer of C ode (SOC) 2005Has mentored for 2006, 2007 and 2008 SOC

Toowoomba, Queensland, AustraliaUni student, local government officer and freelancer developer

Page 3: migrator

Presentation name change me in master 3

Joomla! 1.0 to 1.5 Migration

• Migration is the key word here, not upgrading

• Migration is a four step process:– Install the Migrator into your 1.0 site– Give the migrator any third party “ETL”

plugins– Run your migration with the migrator– Install 1.5 and load the migration data

Page 4: migrator

Presentation name change me in master 4

Joomla! 1.0 to 1.5 Migration

• But what does the migrator produce?• Can I do the migration by hand?• Pitfalls:

– Missing prefix– Core hacks in 1.0– Not reuploading migration SQL file

Page 5: migrator

Presentation name change me in master 5

Overview

The Journey of 1.0 to 1.5• Generate a SQL dump out of 1.0• Do a base 1.5 install• At the migration step either upload via FTP or HTTP• Run the migration wizard and finish installation.

Page 6: migrator

Presentation name change me in master 6

Installing the Migrator

Getting the installation package• http://joomlacode.org/gf/project/pasamioprojects/frs

• Download available on the web

Page 7: migrator

Presentation name change me in master 7

Installing the Migrator

• Install into Joomla! 1.0

Page 8: migrator

Presentation name change me in master 8

Doing your migration!

• The Migrator welcome screen explains all of the steps, normally all you need to do is click “Create Migration SQL File”

Page 9: migrator

Presentation name change me in master 9

Doing your migration

• A few screens will flash past as the migrator works and it will be completed:

• Note the SQL download file name before you click “Download”, in this case it was: 'moffats_joomla_1013_20070727_102337.sql'

Page 10: migrator

Presentation name change me in master 10

Download the SQL Dump

• The download page lists all available dump files, click “Download” to retrieve the dump file from your website.

Page 11: migrator

Presentation name change me in master 11

Joomla! 1.5 Install

• Now that we have the dump of our old site, we start creating a new 1.5 install.

Page 12: migrator

Presentation name change me in master 12

Upload Options

• If you are migrating a small site (generated SQL file smaller than 2MB) you can use the HTTP upload facility on the migration form

• If you are migrating a site larger than this, you will need to upload your SQL into the “/installation/sql/migration/” folder on the server and call it “migrate.sql”

• Both methods require reuploading the document again if the migration process fails or is interrupted.

Page 13: migrator

Presentation name change me in master 13

Migration

• You can start migration. • When prompted click next and enter your

site name, and click next to finish installation.

Page 14: migrator

Presentation name change me in master 14

Migration

• Enter site name, migration complete!

Page 15: migrator

Presentation name change me in master 15

Migration Complete

• Your Joomla! site should continue as normal, delete the 'installation' folder and view your new site.

• Keep in mind: – A new main menu module is created

automatically and published– All other modules are migrated as unpublished– You will have to install the 3PD modules from

your old site, either the 1.0 versions using the legacy plugin or 1.5 versions that have been updated.

– Some menu URL's might not work

Page 16: migrator

Presentation name change me in master 16

Joomla! 1.5 Post-Migration

• Migration Assistant is a 1.5 component that allows you to migrate settings from your configuration.php file in 1.0 but has to be installed and run after 1.5 is installed

• This tool also allows you to remigrate into an existing 1.5 site, however all data in the 1.5 site is removed in the process.

• Currently in beta!• Available with the migrator:

http://joomlacode.org/gf/project/pasamioprojects/frs

Page 17: migrator

Presentation name change me in master 17

For 3PD Developers

• The migrator allows for plugins installable in the 1.0 site for third party extensions

• There is no way to perform actions as a part of the 1.5 installation process, only SQL can be used.

Page 18: migrator

Presentation name change me in master 18

Developing ETL Plugins

• Two types of plugins: ETL and SQL.• An ETL plugin allows you to transform and

export your actual data from Joomla!• A SQL plugin prepends SQL files to your data

dump before the ETL plugins start• Very easy to write, very quick to develop:

– ETL Plugin just needs to be named to the table name and extend the ETLPlugin class.

– SQL plugin is a plain SQL file

Page 19: migrator

Presentation name change me in master 19

A Simple ETL Plugin Example

<?phpclass TableName_ETL extends ETLPlugin {

function getName() { return “Descriptive name”; }function getAssociatedTable() { return “tablename”; }

}

Page 20: migrator

Presentation name change me in master 20

ETL Plugins

• An ETL Plugin can be more complicated to allow for:– renaming fields,– altering field values– and writing custom transformation steps (e.g.

moving settings in configuration files into a database)

Page 21: migrator

Presentation name change me in master 21

Demonstration

• Export from 1.0 the Migrator data– There aren't any third party migrator plugins

yet except for DocMan, so we can't install those.

• Import into 1.5 the Migrator data• Work with 1.5 site for a short while

• Important URL:http://joomlacode.org/gf/project/pasamioprojects/frs/