Actions

Transferring an installation/ru: Difference between revisions

From LimeSurvey Manual

(Created page with "Возможно, у Вас появилась задача перенести установленную систему на другой сервер. Данный проц...")
(Created page with "В общем, отличия от новой (чистой) установки заключаются в следующем: #'''config.php''' хранит базовые п...")
Line 4: Line 4:
Возможно, у Вас появилась задача перенести установленную систему на другой сервер. Данный процесс должен быть простым, но может быть осложнен несколькими факторами. Документ описывает процедуру переноса и восстановления в случае если что либо пошло не так.
Возможно, у Вас появилась задача перенести установленную систему на другой сервер. Данный процесс должен быть простым, но может быть осложнен несколькими факторами. Документ описывает процедуру переноса и восстановления в случае если что либо пошло не так.


In general, the only changes from a new, clean installation are the following:
В общем, отличия от новой (чистой) установки заключаются в следующем:
# '''config.php''' is usually changed to store basic installation parameters as well as any custom settings made
#'''config.php''' хранит базовые параметры установки, потому как туда записываются текущие настройки.
# '''upload/*''' may contain custom templates or uploaded files
#'''upload/*''' каталог может хранить пользовательские шаблоны или выгруженные файлы
# '''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...'''.
#'''Таблицы базы данных SQL''' содержат в себе данные сохраненные во время процесса установки. Также можно отметить,  что там могут быть несколько новых таблиц созданных для хранения копий ключей доступа и результатов прошлых и активных на данный момент опросов. Такие таблицы обычно называются примерно следующим образом: '''lime_survey_nnn...''', '''lime_tokens_nnn...''', lime_oldsurvey_nnn...''', and lime_oldtokens_nnn...'''.


Otherwise, unless you have gone in and made custom patches to the code, changes are limited to these areas.
Otherwise, unless you have gone in and made custom patches to the code, changes are limited to these areas.

Revision as of 03:52, 17 May 2015

__ОГЛАВЛЕНИЕ__

Возможно, у Вас появилась задача перенести установленную систему на другой сервер. Данный процесс должен быть простым, но может быть осложнен несколькими факторами. Документ описывает процедуру переноса и восстановления в случае если что либо пошло не так.

В общем, отличия от новой (чистой) установки заключаются в следующем:

  1. config.php хранит базовые параметры установки, потому как туда записываются текущие настройки.
  2. upload/* каталог может хранить пользовательские шаблоны или выгруженные файлы
  3. Таблицы базы данных SQL содержат в себе данные сохраненные во время процесса установки. Также можно отметить, что там могут быть несколько новых таблиц созданных для хранения копий ключей доступа и результатов прошлых и активных на данный момент опросов. Такие таблицы обычно называются примерно следующим образом: lime_survey_nnn..., lime_tokens_nnn..., lime_oldsurvey_nnn..., and lime_oldtokens_nnn....

Otherwise, unless you have gone in and made custom patches to the code, changes are limited to these areas.

The goal in transferring an installation over to a new system is similar to upgrading.  The biggest difference is we try to simply 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 verify it is working.

Transferring any version

  1. Prepare and save the old release
    1. Backup your installation directory files and SQL-based database
      1. At the command-line level, make a .zip or similar archive of the whole installation directory tree of files
      2. Use phpMyAdmin or similar to export all tables; or use the LimeSurvey Administration button to backup the entire database
    2. Copy your config.php file separately for easy access to edit
  2. Move the saved release to the new machine
    1. Unpack your installation files
      1. Create your new installation directory (same name is convenient)
      2. Unpack/unzip the installation files into it that were saved earlier
    2. Setup your SQL database
      1. Create the new database using phpMyAdmin or a command line interface
      2. Load the saved SQL-based database to recreate the tables and content
  3. Edit config.php to reflect changes from the old release and check your installation
    1. 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
    2. Visit the survey admin page or the page of an active survey; verify everything appears to be working.
  4. You are done (: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");
....