Actions

Перенос установки

From LimeSurvey Manual

Revision as of 03:57, 17 May 2015 by Nickdsl (talk | contribs) (Created page with "Суть переноса установки на новую систему аналогична процессу обновления до новой версии. Самая...")

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

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

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

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

Если Вы осуществили применение патчей кода, то изменения коснутся и этих областей.

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

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");
....