Actions

Transferring an installation/ja: Difference between revisions

From LimeSurvey Manual

(Created page with "=どのバージョンの移動でも= # 旧リリースを保存します ## インストールディレクトリとSQLデータベースをバックアップ ### コマン...")
(Updating to match new version of source page)
Line 2: Line 2:
__TOC__
__TOC__


新しいサーバーに、インストールしたシステムを移動することがあるかもしれません。大体は簡単なのですが、いろいろと要素がからんで厄介になることもありえます。下に注意点や問題があった時のリカバー方法を記します。
You might get the task of moving the LimeSurvey installation to a new server. The process should be simple, but it can get complicated by other factors. You may find below information on how to do the transfer and what to look out for, and information on how to recover from if you encounter a problem.


一般に、クリーンインストールしたときの新しいLimesurveyは下のような違いがあるだけです:
In general, the only changes from a new and clean installation are the following:
# '''config.php''' がインストールやその後のカスタマイズのときのパラメータを持っています。
# '''config.php''' is usually changed to store basic installation parameters as well as any custom settings made;
# '''upload/*''' に、カスタムテンプレートやその他のアップロードファイルが入っているかも知れません。
# '''upload/*''' may contain custom templates or uploaded files;
# インストール時につくられた '''SQL database tables''' にデータが入っているでしょう。また、トークンや回答データを格納するために、新しいテーブルも作られています。古い回答なども同様です。テーブル名は、通常 '''lime_survey_nnn...''' '''lime_tokens_nnn...''' '''lime_oldsurvey_nnn''' '''lime_oldtokens_nnn''' といった感じです。
# '''SQL database tables''' should have had data added to the tables created at installation time. Note also that some new tables may have been created to save copies of token and result data from previously or currently active surveys. These new tables are usually named '''lime_survey_nnn...''', '''lime_tokens_nnn...''', '''lime_oldsurvey_nnn...''', and '''lime_oldtokens_nnn...'''.


特にコードにパッチをあてたりしたのでなければ、違うのはそのあたりだけです。
Otherwise, unless you went in and made custom patches to the code, changes should be limited to these areas.


インストールの移動時にやるべきことは、アップグレードと同様です。いちばんの違いは、新しくインストールを行うという点くらいです。旧バージョンから新バージョンへのアップグレードをする予定です、それは後回しにして、移動したシステムがちゃんと動くのを確認してからにしましょう。
The goal in transferring an installation over to a new system is similar to upgrading. The biggest difference is that we simply try to recreate the existing installation on the new computer. If you wish to [[Upgrading from a previous version|upgrade to a newer version]] also, do this as a later, second step once you have transferred the installation and verified that it works.


=どのバージョンの移動でも=
=どのバージョンの移動でも=
Line 31: Line 31:
# 完了 (: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 machine, you can now go through the same process described in the section related to the [[Upgrading from a previous version|LimeSurvey upgrade to a newer version]].


=Things that go wrong=
=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.
As simple as this appears, things do seem to go wrong sometimes. Take a deep breath. Verify that you followed thoroughly the steps. Otherwise, read below to see where other people got hung up along the way.


==Different PHP installation on each machine==
==Different PHP installation on each machine==
Line 43: Line 43:
==Different LimeSurvey version (installation and DB backup file archives do not match)==
==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.
There is a possibility that 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, if you search inside the SQL database backup file, you will find a section that looks similar to the example provided below where the database version is stored:




Line 52: Line 52:
INSERT INTO lime_settings_global VALUES("DBVersion","126");
INSERT INTO lime_settings_global VALUES("DBVersion","126");
....</syntaxhighlight>
....</syntaxhighlight>
'''This value is used by the installer to determine how to apply changes to tables when upgrading.'''

Revision as of 12:25, 7 August 2017

You might get the task of moving the LimeSurvey installation to a new server. The process should be simple, but it can get complicated by other factors. You may find below information on how to do the transfer and what to look out for, and information on how to recover from if you encounter a problem.

In general, the only changes from a new and clean installation are the following:

  1. config.php is usually changed to store basic installation parameters as well as any custom settings made;
  2. upload/* may contain custom templates or uploaded files;
  3. SQL database tables should have had data added to the tables created at installation time. Note also that some new tables may have been created to save copies of token and result data from previously or currently active surveys. These new tables are usually named lime_survey_nnn..., lime_tokens_nnn..., lime_oldsurvey_nnn..., and lime_oldtokens_nnn....

Otherwise, unless you went in and made custom patches to the code, changes should be limited to these areas.

The goal in transferring an installation over to a new system is similar to upgrading. The biggest difference is that we simply try to recreate the existing installation on the new computer. If you wish to upgrade to a newer version also, do this as a later, second step once you have transferred the installation and verified that it works.

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

  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 machine, you can now go through the same process described in the section related to the LimeSurvey upgrade to a newer version.

Things that go wrong

As simple as this appears, things do seem to go wrong sometimes. Take a deep breath. Verify that you followed thoroughly the steps. Otherwise, read below 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)

There is a possibility that 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, if you search inside the SQL database backup file, you will find a section that looks similar to the example provided below where the database version is stored:


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

This value is used by the installer to determine how to apply changes to tables when upgrading.