Actions

Transferring an installation

From LimeSurvey Manual

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎日本語 • ‎Nederlands • ‎português do Brasil • ‎русский • ‎slovenščina

So maybe you have the task of moving your installation to a new server.  The process should be simple but can get complicated by other factors.  Here we document how to do the transfer and what to look out for and recover from if you encounter a problem.

In general, the only changes from a new, 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 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 Button-export-sql.png 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");
....