This guide is intended to help you move TAO 3.1 from one server to another without data loss.

For older installations see:

• Server Migration 2.5.
• Server Migration 3.0.

## Requirements

• This guide assumes you have not heavily modified your configuration. If you are using alternative storage implementations (such as NoSql), the migration might be more complex.
• This guide assumes that the technology stack did not change. There might be additional issues if you would like to migrate between different Operating Systems (Windows->Linux) or Databases (MySql => Postgres)

## Old Server

• Copy the entire TAO data and config directory from the old server (by default found in config and data).
• Create a dump of the database making sure to include the routines (if you are using mysql, use mysqldump -R).

## New Server

### File migration

* Replace the config and data directory and to set the correct file owner/rights.

* Modify config/generis.conf.php to reflect your new domain and directories. (Do NOT change GENERIS_INSTANCE_NAME or LOCAL_NAMESPACE.)

* watch out for the trailing slashes when writing paths !

define('ROOT_PATH','/var/www/newTaoDirectory/');
define('ROOT_URL','http://www.newTaoDomain.com/');
.
.
define('FILES_PATH','/opt/newTaoDataDirectory/');

* Modify config/generis/filesystem.conf.php to reflect your new file paths. For this change the filesPath and the root of each adapter:

return new oat\oatbox\filesystem\FileSystemService(array(
'filesPath' => 'NEW_FILE_DIRECTORY_HERE',
'class' => 'Local',
'options' => array(
)
),
'public' => array(
'class' => 'Local',
'options' => array(
'root' => 'NEW_FILE_DIRECTORY_HERE/tao/public'
)
),
.
.

* Modify config/generis/persistences.conf.php to reflect your new database configuration.

'default' => array(
'driver' => 'pdo_mysql',
'host' => 'localhost',
'dbname' => 'DbName',
),

* Update the directory path value in config/tao/websource_[CODE].conf.php to point to your new TAO data directory. (Do NOT modify fsUri.)

return array(
'className' => 'oat\\tao\\model\\websource\\TokenWebSource',
'options' => array(
'secret' => 'a0c2ef52398c24d5347109f930d907d3',
);