Actions

Transferring an installation/ja: Difference between revisions

From LimeSurvey Manual

(Created page with "インストールの移動時にやるべきことは、アップグレードと同様です。いちばんの違いは、新しくインストールを行うという点く...")
(Created page with "=どのバージョンの移動でも= # 旧リリースを保存します ## インストールディレクトリとSQLデータベースをバックアップ ### コマン...")
Line 13: Line 13:
インストールの移動時にやるべきことは、アップグレードと同様です。いちばんの違いは、新しくインストールを行うという点くらいです。旧バージョンから新バージョンへのアップグレードをする予定です、それは後回しにして、移動したシステムがちゃんと動くのを確認してからにしましょう。
インストールの移動時にやるべきことは、アップグレードと同様です。いちばんの違いは、新しくインストールを行うという点くらいです。旧バージョンから新バージョンへのアップグレードをする予定です、それは後回しにして、移動したシステムがちゃんと動くのを確認してからにしましょう。


=Transferring any version=
=どのバージョンの移動でも=
# Prepare and save the old release
# 旧リリースを保存します
## Backup your installation directory files and SQL-based database
## インストールディレクトリとSQLデータベースをバックアップ
### At the command-line level, make a '''.zip''' or similar archive of the whole installation directory tree of files
### コマンドとしては、ディレクトリツリーを丸ごと '''.zip''' ファイルのようなものにしてしまいます
### Use phpMyAdmin or similar to export all tables; or use the '''LimeSurvey Administration''' button [[File:button-export-sql.png]] to backup the entire database
### phpMyAdminのようなツールで、全テーブルをエクスポートします; または、'''LimeSurvey Administration''' 内の [[File:button-export-sql.png]] ボタンを押して、全データベースをバックアップします
## Copy your '''config.php''' file separately for easy access to edit
## '''config.php''' をコピーしておきます
# Move the saved release to the new machine
# 別マシンにそれを移動します
## Unpack your installation files
## ファイルを展開します
### Create your new installation directory (same name is convenient)
### インストールディレクトリを新たに作ります(同じ名前がよいでしょう)
### Unpack/unzip the installation files into it that were saved earlier
### unzipなどで元あったようにファイルを展開します
## Setup your SQL database
## SQLデータベースのセット
### Create the new database using phpMyAdmin or a command line interface
### データベースを新たに(phpMyAdminやその他のコマンドラインで)作成
### Load the saved SQL-based database to recreate the tables and content
### 保存してあったデータベースからテーブルとその内容を再生成
# Edit '''config.php''' to reflect changes from the old release and check your installation
# '''config.php''' をいじって新サーバーにあうように直し、チェック
## Be careful to check the database name, username, and password; as well as the installation server name, URL path and physical directory path to the installation
## データベース名、ユーザー名、パスワードをちゃんとチェックしましょう。サーバー名やURLのパス、ディレクトリのパスも同様。
## Visit the survey admin page or the page of an active survey; verify everything appears to be working.
## アンケート管理ページにアクセスしてみて、ちゃんと期待通りに動いているかを確認。
# You are done (:biggrin:) .
# 完了 (:biggrin:)


If you wish to upgrade on this same machine, you now can go through the same process described earlier to [[Upgrading from a previous version|upgrade to a newer version]].
If you wish to upgrade on this same machine, you now can go through the same process described earlier to [[Upgrading from a previous version|upgrade to a newer version]].

Revision as of 07:01, 24 January 2014

新しいサーバーに、インストールしたシステムを移動することがあるかもしれません。大体は簡単なのですが、いろいろと要素がからんで厄介になることもありえます。下に注意点や問題があった時のリカバー方法を記します。

一般に、クリーンインストールしたときの新しいLimesurveyは下のような違いがあるだけです:

  1. config.php がインストールやその後のカスタマイズのときのパラメータを持っています。
  2. upload/* に、カスタムテンプレートやその他のアップロードファイルが入っているかも知れません。
  3. インストール時につくられた SQL database tables にデータが入っているでしょう。また、トークンや回答データを格納するために、新しいテーブルも作られています。古い回答なども同様です。テーブル名は、通常 lime_survey_nnn... lime_tokens_nnn... lime_oldsurvey_nnn lime_oldtokens_nnn といった感じです。

特にコードにパッチをあてたりしたのでなければ、違うのはそのあたりだけです。

インストールの移動時にやるべきことは、アップグレードと同様です。いちばんの違いは、新しくインストールを行うという点くらいです。旧バージョンから新バージョンへのアップグレードをする予定です、それは後回しにして、移動したシステムがちゃんと動くのを確認してからにしましょう。

どのバージョンの移動でも

  1. 旧リリースを保存します
    1. インストールディレクトリとSQLデータベースをバックアップ
      1. コマンドとしては、ディレクトリツリーを丸ごと .zip ファイルのようなものにしてしまいます
      2. phpMyAdminのようなツールで、全テーブルをエクスポートします; または、LimeSurvey Administration 内の ボタンを押して、全データベースをバックアップします
    2. config.php をコピーしておきます
  2. 別マシンにそれを移動します
    1. ファイルを展開します
      1. インストールディレクトリを新たに作ります(同じ名前がよいでしょう)
      2. unzipなどで元あったようにファイルを展開します
    2. SQLデータベースのセット
      1. データベースを新たに(phpMyAdminやその他のコマンドラインで)作成
      2. 保存してあったデータベースからテーブルとその内容を再生成
  3. config.php をいじって新サーバーにあうように直し、チェック
    1. データベース名、ユーザー名、パスワードをちゃんとチェックしましょう。サーバー名やURLのパス、ディレクトリのパスも同様。
    2. アンケート管理ページにアクセスしてみて、ちゃんと期待通りに動いているかを確認。
  4. 完了 (:biggrin:)

If you wish to upgrade on this same machine, you now can go through the same process described earlier to upgrade to a newer version.

Things that go wrong

As simple as this appears, things do seem to go wrong.  Take a deep breath.  Verify you followed the steps.  Otherwise read on to see where other people got hung up along the way.

Different PHP installation on each machine

Different SQL Database between machines

Different LimeSurvey version (installation and DB backup file archives do not match)

Maybe you did not have the correct installation backup code to match the backed-up SQL database?  It could be easy to get these separate backups confused, out of sync, or otherwise separated.  There are a few things that can help you find out what version each backup may be.  When using the LimeSurvey SQL backup option, the default file name it creates has the date of the backup in the name.  Also, searching inside the SQL database backup file, there should be a section that looks similar to the below where the database version is stored.  This value is used by the installer to determine how to apply changes to tables when upgrading, for example.


#-----------------------------------------------------------------------
# Table data for lime_settings_global
#-----------------------------------------------------------------------
INSERT INTO lime_settings_global VALUES("DBVersion","126");
....