Você está na página 1de 21

Migration

Joomla! 1.0 to 1.5

Sam Moffatt
Joomla!Day Bangkok, 2008
About Me
Sam Moffatt
[ pasamio ] [ sam.moffatt@joomla.org ]
Developer
Migration Tool
JAuthTools

Joined Joomla! after Summer of C ode (SOC) 2005


Has mentored for 2006, 2007 and 2008 SOC

Toowoomba, Queensland, Australia


Uni student, local government officer and
freelancer developer

Presentation name change me in master


2
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

Presentation name change me in master


3
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

Presentation name change me in master


4
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.

Presentation name change me in master


5
Installing the Migrator

Getting the installation package


• http://joomlacode.org/gf/project/pasamioprojects/frs
• Download available on the web

Presentation name change me in master


6
Installing the Migrator

• Install into Joomla! 1.0

Presentation name change me in master


7
Doing your migration!

• The Migrator welcome screen explains all


of the steps, normally all you need to do is
click “Create Migration SQL File”

Presentation name change me in master


8
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'

Presentation name change me in master


9
Download the SQL Dump

• The download page lists all available dump


files, click “Download” to retrieve the
dump file from your website.

Presentation name change me in master


10
Joomla! 1.5 Install

• Now that we have the dump of our old


site, we start creating a new 1.5 install.

Presentation name change me in master


11
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.
Presentation name change me in master
12
Migration

• You can start migration.


• When prompted click next and enter your
site name, and click next to finish
installation.

Presentation name change me in master


13
Migration

• Enter site name, migration complete!

Presentation name change me in master


14
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
Presentation name change me in master
15
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
Presentation name change me in master
16
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.

Presentation name change me in master


17
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

Presentation name change me in master


18
A Simple ETL Plugin Example

<?php
class TableName_ETL extends ETLPlugin {
function getName() { return “Descriptive name”; }
function getAssociatedTable() { return “tablename”; }
}

Presentation name change me in master


19
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)

Presentation name change me in master


20
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/

Presentation name change me in master


21

Você também pode gostar