Actions

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

From LimeSurvey Manual

Revision as of 12:25, 7 August 2017 by FuzzyBot (talk | contribs) (Updating to match new version of source page)

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

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. Делаем резервную копию файлов и базы данный
      1. В командной строке вводим команду для упаковки дерева каталогов текущей конфигурации.
      2. Используя phpMyAdmin или аналоги, экспортируем все таблицы; или нажимаем кнопку в Административной панели LimeSurvey , для резервирования базы данных
    2. Скопируем файл config.php отдельно для облегчения процесса редактирования
  2. Перенос сохраненной конфигурации на новую машину
    1. Извлечение файлов
      1. Создаем новую директорию, в которой будет работать система (будет удобно, если с тем же самым именем)
      2. Извлекаем файлы, которые были сохранены ранее
    2. Установка базы данных
      1. Создайте новую базу данных используя консоль либо phpMyAdmin
      2. Загрузите сохраненные SQL-файлы в базу для создания таблиц с данными
  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.

Что то пошло не так

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.

Машины отличаются версией установленного PHP

На машинах установлены разные СУБД

Разные версии LimeSurvey (версии файлов системы и дампа базы данных не совпадают)

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.