Category: Uncategorised
Hits: 22775

2006年の登場からバージョンアップデートを積み重ねてきたJoomla! 1.0系だが、2008年1月にメジャーバージョンアップグレードとなるJoomla! 1.5系が正式に公開となった。メジャーバージョンアップグレードによってJoomla!誕生の元となったMamboとは大幅に変更された。Joomla!が完全に独立して一人歩きを始めた証だろう。
さて、メジャーバージョンアップグレードの方法であるが、これまでのJoomla! 1.0系のマイナーアップデートとはことなり一筋縄ではいかない。Joomla!のサイトにアップデートの仕方が掲載されているので紐解いてみよう。かなり乱暴に意訳+脚色してますが、内容はつかんでいただけると思います。

Joomla 1.5.x用のコンポーネントを利用したマイグレーションについてはJoomla 1.5.x mtwMigratorを参照ください。


Migrating from 1.0.x to 1.5 Stable

「Joomla! 1.0.x から Joomla! 1.5 へ移行」
(原文は http://docs.joomla.org/Migrating_from_1.0.x_to_1.5_Stable に掲載。)

Joomla! 1.0.x からJoomla! 1.5までの移行は二段階でほぼ自動的に行われるとある。

まずはJoomla! 1.0.xのエクスポートと、次にJoomla! 1.5インストーラ上での移行のためのインポートのようだ。ただ移行システムは完全に移行を行うものではなく、Joomla! 1.0.xとJoomla! 1.5とで差異のあるメニューやコンテンツアイテムのパラメータを除くとある。あとデータの損失があっても何も表示されないようだ。ま、しかたないだろう。

取り敢えずはJoomlla! 1.0.xのデータを取り出すことが重要なようだ。

お約束で、「最初に、このドキュメントのすべてを読んで、休止時間を最小となるようにあなたのサイトで試みる前にテストしてください。」とある。後で泣きを見ないように元の環境に戻せるようにバックアップは重要だろう。

前提条件

Joomla! 1.0.xの最新リリースを使ってますよね?当たり前でしょうが最新のリリースから移行するのが最良でしょう。もしJoomla! 1.0.13を使用している場合は Rob Schley's patch for admin sessionsをインストールする必要があるとのことです。何事にも完全は無いので、何か支障をきたすといけないので始める前にすべてのフルバックアップを取るようにと指示されてます。Joomla!の作り手達はJoomla! 1.5への移行が完全に終えるまで、Joomla 1.0.xの環境を破壊しないで置く方が良いと忠告してくれています。理想としてはテスト環境で移行を試みた上で別の環境へJoomla! 1.5をインストールして移行処理を行ってくださいとあります。

Step 1: 移行コンポーネントをダウンロードして、Joomla! 1.0.xに導入。

を、なんだ便利なコンポーネントが出てるのね。ということで移行コンポーネント(migration component)の最新バージョンはPasamio Project's FRS サイトにあります。移行コンポーネントをダウンロードしたら、Joomla! 1.0.xにインストールします。通常のコンポーネントと同じ方法です。念の為に書いておくと、日本語環境であれば管理画面のトップメニューの「インストーラ」から「コンポーネント」を選択(クリック)して、 新規コンポーネントインストール パッケージファイルアップロード パッケージファイルで、ダウンロードしたファイルを選択します。そして「Upload File & Install」をクリックすればインストール完了です。当然ながらこれだけでは移行は完成しませんよ。コンポーネントメニューのMigratorを選択することでMigratorコンポーネントにアクセスできます。

Step 2: サードパーティのプラグインをインストール。

この移行システムはコア・システムのみしか扱えません。拡張したシステムのデータベースのテーブルを含みたい場合は、サードパーティが用意する拡張プラグインを導入する必要があります。拡張プラグインには、プレーンテキストSQLファイルである「SQL」プラグインとテーブルに保存されたデータまたは構成ファイルでを扱う方法を移行システムに教える簡単なPHPである"ETL"プラグインの2つのタイプがあります。導入は"Add Third Party Migrators"から行えます。ダウンロードしたプラグインを読み込むだけです。SQLファイルは自動的に生成されます。ETLプラグインは自動的に実行されます。Migratorコンポーネントのメイン画面にある"List Plugins"をクリックすることによって、導入されているETL pluginsの一覧を見ることができます。

Step 3: 移行の為のSQLファイルを作成。

拡張プラグインはインストールしただけで使えます。移行SQLファイルを作るために"Create Migration SQL file"を選択します。管理画面がタイムアウトを引き起こように移行SQLファイルを生成するように設計されており、ページが自動的にリフレッシュされます。生成が完了すると移行SQLファイルをダウンロード出来るようになります。mosimageタグの書き直しを含む、Joomla! 1.5で行われた変更と互換性があるように加工され移行SQLファイルが生成されています。

Step 4: Joomla! 1.5インストール

ノート:既存のJoomla! 1.0.xのディレクトリとデータベースとは別にJoomla! 1.5をインストールしてください。異なったデータベースが用意できない場合はまたは、異なった接頭語を指定してください。Joomla! 1.0.xと同じディレクトリにJoomla! 1.5は上書き展開できません。Joomla! 1.5用に新しいサイトを作成しなければなりません。あるいはまた、Joomla! 1.0.xがある場所に構築する場合は、まずJoomla! 1.0.xの全てを安全な空ディレクトリに動かしてください。

ノート:既存のJoomla! 1.0.xサイトと同じディレクトリに新しいJoomla! 1.5サイトを上書きインストールするのは良くありません。異なったディレクトリでテストしてください。

まずJoomla! 1.0.xサイトのファイルシステムとデータベースをフルバックアップしてください。

移行の最終段階は新しいJoomla! 1.5サイトのインストールです。完全に新しいディレクトリにJoomla! 1.5をインストールする必要があります。既存のJoomla! 1.0.xのディレクトリとは別にしてください。既存Joomla! 1.0.xサイトへJoomla! 1.5を展開するとJoomla! 1.0.x用のconfiguration.phpが残ります。Joomla! 1.0.xを移動させるか、または新しいディレクトリを作成してください。通常のインストールに従ってインストールを行います。サイト名等を入力する最終的なステップで移行の手続きが行えます。移行は手続きのために、生成した移行SQLファイルを新しいJoomla! 1.5サイトにアップロードする必要があります。アップロードには次の二つの方法があります。

HTTP Upload
FTP/SCP Upload

HTTPアップロードは移行SQLファイルをPHPでアップロードする簡単で良い方法です。ただしファイルサイズの制限があります。代替手段としてはFTPまたはSCPによるアップロードで使用しているプロバイダーが提供しているファイル転送を使用することで移行SQLファイルをアップロードする方法です。PHPではアップロードできない大きいSQLファイルの場合に役に立ちます。HTTPアップロードを使用するには、通常のコンポーネントインストールのように単に移行SQLファイルを選択してください。代替のアップロードを使用する場合は、installation/sql/migrationフォルダーにファイルをアップロードして、ファイル名、"migrate.sql"と変更してください。なにかの理由で移行が失敗した場合、HTTPとFTP/SCPのいずれの場合でも移行SQLファイルの再アップロードが必要となると思います。移行SQLファイルを生成したJoomla! 1.0.xでの接頭語が"jos_"を「以前のテーブル頭文字」のテキストボックスに記入します。「アップロードと実行」をクリックして移行が終了した後、サイト名を入力して次へ進んでください。移行システムを使用するために"/installation/sql/migration"フォルダーとテンポラリフォルダー(e.g. "/tmp") は、ウェブユーザー(e.g. "wwwrun", "www-data" or "apache")で書込可能である必要があります。

また、移行作業する前に「このスクリプトは Joomla! 1.0 からのマイグレーションスクリプトです。 」にチェックする必要があります。忘れるとデータインポートに問題がでます。


Joomla! 1.0.xとJoomla! 1.5の大きな差異はmosimageがなくなったこと。制限があるので逆に使いやすかったのだが移行をするのにネックだった。この点はmigration componentで解決できる。後はメニューのエクステンションをどうするかが課題です。

migration componentが作成したデータで移行が出来ません。なにが原因なのかな?

Joomla! 1.5のデータベースの接頭語指定をjos_から変更すると上手くいかないようです。訳し方の間違いかな。

原文は「続きを読む」をクリックしてください。 


Migrating from 1.0.x to 1.5 Stable

The migration from Joomla! 1.0 to 1.5 is handled for the most part automatically in two stages. The first stage is the export migration component for Joomla! 1.0 and the second stage is the import or migration phase of the Joomla! 1.5 installer. The system is automated due to a large number of changes that make data slightly incompatible between Joomla! 1.0 and 1.5, such as parameters for menus and content items. Whilst it is still possible to use a database dump to migrate, this is not advised as there will be data loss. This page aims to detail how to migrate from Joomla! 1.0 to Joomla! 1.5 with as much ease as possible.

Note: Read all of this document first and test before you attempt this in your production site to minimise down time.

Prerequisites

You will need a working Joomla! install, though using the latest available release of Joomla! 1.0 is always the best option. It is suggested that if you are using 1.0.13 you install Rob Schley's patch for admin sessions. As with everything you should take a full backup of everything before you start just in case something does go wrong. We advise that you do not destroy your 1.0.x install until you have completely finished migrating to 1.5 and are happy that things are working properly. Ideally you should complete migration using a testing system first before attempting it on your production system (e.g. either by using sites restored from backups or other replicas) and when deploying, separate your 1.0.x install from 1.5 (e.g. different database or at the least a different prefix).

Step 1: Downloading the Migrator component and installing it into your 1.0 instance

The latest version of the migrator component exists at the Pasamio Project's FRS site. At the time of writing the latest release is Migrator RC6. Download the Migrator component to your system and then install it into the 1.0 install. This is done like any normal component install. There will be a Migrator entry in the Component menu option where you can access the Migrator.

Step 2: Installing Third Party Migrator plugins

The Migration system only handles the core system in its migration which means that if you want to include third party extension data from other tables you will have to install migrator plugins to handle the migration of this data. There are two types of plugins that are used: an "SQL" plugin which is a plain text SQL file and an "ETL" Plugin which is a bit of PHP that tells the migrator how to handle the data stored in tables (or in configuration files). This is done by selecting "Add Third Party Migrators", and then locating the plugin you wish to install and uploading the file. SQL files will be prepended to the output automatically and ETL plugins will be executed automatically. You can view a list of ETL plugins by clicking "List Plugins" in the main screen.

Step 3: Creating the Migration SQL File

Once you have installed any third party migrator plugins, you can select the "Create Migration SQL file" to begin the creation process. The system is designed to build an SQL file without causing a timeout on the server, so you may notice that the page automatically refreshes and displays status information. Eventually it will display a notification that the process has been completed and the SQL file will be available for download. Part of the SQL file generation involves the alteration of various fields to make them compatible with changes made in Joomla! 1.5, including the rewriting of mosimage tags.

Step 4: Installing Joomla! 1.5

Note: Create your new Joomla! 1.5 install in a seperate directory and database to your existing install (or different prefix if you cannot create a new database). You cannot extract over the top of your 1.0 install, you have to create a new Joomla! 1.5 site. Alternatively, move your 1.0 install to a safe location and install into the empty directory 1.0 will have created.

Note: It is not a very good idea to install a new Joomla! 1.5 site over the top of your existing 1.0 site, it is better to test things in a seperate directory and progress from there.

If you haven't done so already, take a full back up of your 1.0 site, including all of the filesystem and the database.

The last phase of the migration is the installation of a new Joomla! 1.5 site. You need to install '1.5 into a completely new directory, you should keep this separate to your 1.0 directory. If you just unzip over the top of your existing 1.0 site, you will have issues with it finding an invalid copy of the configuration.php" file, so either move your original install or create a new directory. Complete the initial steps of the installation as per a normal installation. In the final step where you are prompted for the site name you are given the opportunity to initiate the migration process. Migration requires the generated SQL file to complete its operation, which might need to be uploaded to your new 1.5 site, there are two options for doing this:

The first method, HTTP upload, is best for smaller SQL files that will fit within the upload limits of PHP. The alternative is to upload a file using either FTP, SCP or some other method of file transfer that your hosting provider offers. This is useful for larger SQL files that would normally not be permitted by PHP. To use the HTTP method, simply select the file like a normal component installation. To use the alternative upload method, upload the files into the installation/sql/migration folder and rename the file to be called "migrate.sql". If for some reason the migration fails you will need to reupload the SQL file for both methods, HTTP and FTP/SCP, as the file is altered through the migration process. The prefix for all migration dumps is "jos_", this should be placed into the provided text box. Once migration has been completed, enter in a site name (the site name cannot be migrated for technical reasons) and finish the installation.

Using either method the "/installation/sql/migration" folder and your temporary files folder (e.g. "/tmp") need to be writeable by the web user (e.g. "wwwrun", "www-data" or "apache"). The migrator will write data back to these locations as it updates the dump files.

Please note you also need to tick the "This script is a Joomla! 1.0 migration script" box as well before you migrate otherwise you will have issues with importing data.