skyBuilders timeLines HOWTO Migrate from Windows 2000/IIS/ASP/VBScript/Access|SQLServer to GNU/Linux/Apache/PHP/PostgreSQL
- Install the destination site
- Migrate database data
- Phase 1: Import and map data
- Phase 2: Translate relation keys
- Change the site name
- Database username and database name
- Site root directory name
- Virtual Host entry
- DNS entries
- Port non-application files from ASP/SSI to PHP
- Test the migrated site
- Clean up origin host
I. Install a new site on the destination host:
- Using a temporary domain name like temp.skybuilders.com, follow the installation instructions in either How To Install skyBuilders timeLines on RedHat 9.0 (if the destination host has no timelines sites on it yet) or Installing additional timeLines sites on an existing skyHost (otherwise).
- Once intallation is complete, a Data Synchronization is necessary. Load Sync.html and click the Sync Now link under the third section, Data Synchronization. Wait for the sync to complete (it should be under thirty seconds).
- An edit is necessary in /etc/php.ini, especially for larger sites. Open /etc/php.ini in your favorite editor. Look for the line "memory_limit = 16M" and raise the memory limit to 128M (from the 16M recommended in the installation instructions). Save and Exit.
II. Migrate database data using Migration Manager:
- Prepare the origin site for migration by upgrading timelines fully.
- In your favorite timelines-compatible browser, load MigrationManager.html from the newly installed destination site (for example temp.skybuilders.com). The address bar should read something like:
Once the interface loads, three sections of the page should be visible: The Controls section on top, the Listing section bottom left, and the Progress section bottom right.
- Enter the origin site name (the fully qualified domain name of a Windows 2000/IIS/ASP/VBScript/Access|SQLServer-based timeLines installation, in our example "origin.skybuilders.com") into the form input labelled Origin FQDN in the Controls section.
- Click the Load link in the Controls section to load the list of to-be-imported-and-mapped tables into the Listings section. Next to each table is listed a status of 0 or 1 to indicate whether or not it has been impoted yet.
- i. Phase 1: Import and map data
- Click the Run link in the Controls section to import and map the data from the first table in the list. The progress of the import will appear in the Progress section. Once the import and mapping is complete, the status indicator for the table will be set to 1.
- Wait for the import of the current table to be complete (in the case of the first table in the list, this may be near-instantaneous).
- If there is any error in the progress report, submit a bug report and wait for a fix. Otherwise, click the Next link in the Progress section to import the next table.
- Repeat the previous three steps until all the tables in the list have been imported. If they have all been imported, an alert will pop up saying that Phase 1 is complete
- ii. Phase 2: Translate relation keys
- Click the Translate Relations link in the Controls section to translate all relations in all tables. The progress of the translation will appear in the Progress section. If there is any error in the progress report, submit a bug report and wait for a fix. Otherwise, proceed to the next step.
III. Change the site name:
- Open an
ssh session to the destination host as root.
- i. Database username and database name
- Log in to the psql command terminal and the postgres user connecting to the databse template1:
# psql template1 postgres
- Run an SQL Query to change the database username from the destination username "temp_skybuilders_com" to the origin site name (with underscores substituted for dots) "origin_skybuilders_com" (note that the column name being updated in the following query is in fact "usename", not "username"):
=> update pg_shadow set usename = 'origin_skybuilders_com' where usename = 'temp_skybuilders_com';
- Run an SQL Query to re-set the user's password, which is encrypted using a hash of the username (in this example, substitute the password for <password>:
=> alter user origin_skybuilders_com with password '<password>';
- Run an SQL Query to change the database name from the destination database name "temp_skybuilders_com" to the origin database name "origin_skybuilders_com":
=> update pg_database set datname = 'origin_skybuilders_com' where datname = 'temp_skybuilders_com';
- Exit the psql command terminal:
- Restart the postgresql service:
# service postgresql restart
- ii. Site root directory name
- Change directory to the directory above the destination site root:
# cd /var/www
- Move the destination directory to its ultimate goal (the origin site name):
# mv temp.skybuilders.com origin.skybuilders.com
- iii. Virtual host entry in the Apache configuration file
- Open the Apache confiuration file in your favorite editor:
# emacs /etc/httpd/conf/httpd.conf
- Directly above the Virtual Host section for the destination site, add a new Directory section to enable mod_speling, which will allow case-insenitive URLs. The new directory section should refer to the same directory as the ServerRoot line in the VirtualHost section. It should look something like this:
- In the Virtual Host section for the destination site, edit the ServerName line to the origin site name (adding a ServerAlias line if necessary).
- Also in the Virtual Host section for the destination site, edit the ServerRoot line to match the new directory path as in step ii. above (trading out the destination site name for the origin site name).
- Save the file and exit.
- Restart the httpd service:
# service httpd restart
- iv. DNS entries for the Origin Domain Name
- Connect to the appropriate Primary Name Server and edit relevant forward and reverse lookup zones for the origin site name and enter the IP Address of the new destination host, then restart the DNS service or get it to reload the zones.
IV. Port non-application files from ASP/SSI to PHP:
- On the origin host, open Windows Explorer and navigate to the origin site root directory.
- Select all files and directories.
- Deselect just the timelines directory.
- (Assuming WinZip is installed) Right click on any of the selected files and choose the "Add to Zip" option from the pop-up menu.
- In the zip dialog, choose a distinctive name for the zip file using part or all of the origin site name.
- Click the Add button to complete the zip process.
- Close WinZip.
- Open an SFTP client and connect to the destination site, navigating to the destination site root directory on the remote side of the window and the origin site root directory on the local side.
- Upload the origin site zip file to the destination site root directory.
- Close the SFTP client.
- Open an ssh session to the destination host as root and navigate to the destination site root directory.
- Unzip the origin site zip file into the destination site root directory:
# unzip -o origin_skybuilders.zip
- Once the unzip is complete, the zip file may be deleted.
- In your favorite timelines-compatible browser, load MigrationPorter.html from the destination site (now named as the origin site was, so use the origin site name in the URL). The address bar should read something like:
The files port should commence immediately, reporting progress as it goes. If there is any error in the progress report, submit a bug report and wait for a fix. Otherwise, wait for it to complete then move on to the next step.
V. Test the migrated site:
- Load the front page, log into timeLines, generally poke around to make sure thing seem to be running. If there is any problem submit a bug report and wait for a fix. Otherwise, move on to the next step.
VI. Clean up origin host:
- Remove any IIS Web or FTP Sites associated with the site.
- Remove the site root directory from the origin host (this is safe, as all files are backed up).
- If the site used SQL Server, remove the database from the RDBMS.