Actions

インストールしたシステムの移動

From LimeSurvey Manual

Revision as of 07:01, 24 January 2014 by Yamatt (talk | contribs) (Created page with "=どのバージョンの移動でも= # 旧リリースを保存します ## インストールディレクトリとSQLデータベースをバックアップ ### コマン...")

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

一般に、クリーンインストールしたときの新しい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");
....