Actions

Transferring an installation/pt-br: Difference between revisions

From LimeSurvey Manual

(Updating to match new version of source page)
(Updating to match new version of source page)
Line 13: Line 13:
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.
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.


=Transferir uma versão=
=Transferring any version=
# Prepare e salve o lançamento anterior
# Prepare and save the old release:
## Salve seus arquivos de diretório de instalação e o banco de dados baseado em SQL
## Backup your installation directory files and SQL-based database:
### No nível do comando em linha, faça um arquivo '''.zip''' ou similar de todos os arquivos do diretório de instalação
### At the command-line level, make a '''.zip''' or similar archive of the whole installation directory tree of files;
### Use phpMyAdmin ou similar para exportar todas as tabelas; ou use o botão '''Administração do LimeSurvey''' [[File:button-export-sql.png]] para salvar todo o banco de dados
### Use phpMyAdmin or similar to export all tables; or use the ''LimeSurvey backup entire database'' button that is located in the ''Configuration'' dialog, under the Advanced tab;
## Copie seu arquivo '''config.php''' separadamente para fácil acesso posterior para editar
## Copy your '''config.php''' file separately to ease the editing process.
# Mova o lançamento salvo para a nova máquina
# Move the saved release to the new machine:
## Descompacte seus arquivos de instalação
## Unpack your installation files:
### Crie o diretório para sua nova instalaçao (mesmo nome é conveniente)
### Create your new installation directory (same name is convenient);
### Descompacte os arquivos de instalação onde salvamos anteriormente
### Unpack/unzip the installation files into the same folder.
## Configure seu banco de dados SQL
## Setup your SQL database:
### Crie o novo banco de dados usando phpMyAdmin ou uma linha de comando de interface
### Create the new database using phpMyAdmin or a command line interface;
### Carregue o banco de dados SQL salvo para recriar as tabelas e conteúdo
### Load the saved SQL-based database to recreate the tables and content.
# Edite '''config.php''' para refletir as mudanças do antigo lançamento e conferir sua instalação
# Edit '''config.php''' to reflect changes from the old release and check your installation:
## Seja cuidadoso ao conferir o nome, usuário e senha do banco de dados; assim como o nome do servidor de instalação, caminho URL e diretório físico da instalação
## 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;
## Visite a página do administrador da pesquisa ou a página de uma pesquisa ativa; verifique se aparentemente tudo funciona.
## Visit the survey admin page or the page of an active survey and check if everything works.
# Terminado (:biggrin:) .
# You are good to go now :).


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]].
{{Box|If you do not change the location of your LimeSurvey installation and wish only to upgrade it, go through the same process described in the section related to the [[Upgrading from a previous version|LimeSurvey upgrade to a newer version]].}}


=Coisas que podem dar errado=
=Things that could 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.
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.
Line 44: Line 44:


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:  
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:  


<syntaxhighlight lang="sql" enclose="div">
<syntaxhighlight lang="sql" enclose="div">

Revision as of 12:30, 14 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.

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 backup entire database button that is located in the Configuration dialog, under the Advanced tab;
    2. Copy your config.php file separately to ease the editing process.
  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 the same folder.
    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 and check if everything works.
  4. You are good to go now :).
If you do not change the location of your LimeSurvey installation and wish only to upgrade it, go through the same process described in the section related to the LimeSurvey upgrade to a newer version.


Things that could 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.

Instalação diferente de PHP em cada máquina

Banco de dados SQL diferentes entre máquinas

Versão diferente do LimeSurvey (instalação e backup de arquivos de BD não compatíveis)

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.