Back    Next 
Back  Next

Upgrading the Metadot Portal Server

Quick links:

Upgrading from Version 3.1.3 or higher to most recent version

This page provides instructions for upgrading a 3.1.3 or higher version of Metadot to most recent version, so that you can continue to use your existing database. Therefore, the crux of the upgrade process (in addition to installation of the new modules) is to convert the existing database to the most recent schema.

The upgrade scripts convert only from Metadot 3.1.3 or higher to most recent version. If you wish to upgrade starting from a version prior to 3.1.3, you will need to first upgrade the portal to its 3.1.3 version, as described below. This will be done using the upgrade script included in the 3.1.3 tarball, at Sourceforge:
  http://sourceforge.net/project/showfiles.php?group_id=5300&release_id=42360

 

If you are not starting from an existing version of Metadot running on your site, then you can just follow the new installation process instead.

Overview of the Upgrade Process

  1. Back up Database
  2. Back up Customizations
  3. Check Requirements
  4. Convert to 3.1.3 database if necessary
  5. Convert to 4.0 database if necessary
  6. Extract MetaDot files
  7. Configure MetaDot
  8. Install new Perl modules
  9. Run upgrade script
  10. Test from the command line
  11. Update the aliases in your web server configuration
  12. Start up the portal
  13. Change the Metadot file upload directory
  14. Apply Customizations

Back Up Database

Before you start upgrading your system, back up the portal's database. This will preserve your data in case something goes wrong. To back up the database, you will want to use the following command :
$bash > mysqldump -uroot metadotdb > metadotdb.bak
"$bash >" is a representation of the command line prompt and is not part of the command. This will create a file called "metadotdb.bak" that will contain the commands to create all the tables in metadotdb and populate them with your current data.

Back Up Customizations

Before you start, copy the entire Metadot directory to a new directory (that is, make a copy of all the existing Metadot files).

This will allow you to refer to your old configuration settings in the following sections. It will also you to preserve any changes you have made in to the Metadot modules or scripts; those changes will need to be merged in to the new version of the modules.

Check Requirements

Check the new installation instructions to make sure that you are running sufficiently recent versions of Perl and MySQL.

In the remainder of this document, "<METADOT>" will be used to indicate your top-level metadot directory.

Convert database if necessary

The script included as part of the most recent version of the Metadot Portal Server distribution only converts from version 4.0 to the most recent. It does not convert earlier databases. If you are running an earlier version of the system, e.g. version 3.1.2, you will need to perform an additional step or two. You will not need to convert any code, but you will need to upgrade your existing database.

Convert database to 3.1.3 version if necessary

1. Unpack a 3.1.3 tarball in the /tmp directory and modify its metadot.conf to match your old (current) metadot.conf file. The tarball can be found at Sourceforge:
  http://sourceforge.net/project/showfiles.php?group_id=5300&release_id=42360
2. Run the upgrade script from the 3.1.3 distribution. This will convert your database schema to 3.1.3.
3. Follow the upgrade instructions in the remainder of this document to upgrade to version 4.0.

Convert database to 4.0 version if necessary

1. Unpack a 4.0b tarball in the /tmp directory and modify its metadot.conf to match your old (current) metadot.conf file. The tarball can be found at Sourceforge:
  http://www.metadot.net/metadot/index.pl?id=1980&isa=Item&field_name=item_attachment_file&op=download_file
2. Run the upgrade script from the 3.1.3 distribution. This will convert your database schema to 3.1.3.
3. Follow the upgrade instructions in the remainder of this document to upgrade to version 4.0.

Extract MetaDot files

You can now extract the new version of metadot. If you extract it into the same directory as your existing version (after having made a copy of the existing version as specified above), then you will not need to change your web server httpd configuration information.

E.g., for a typical installation, place the tarball in the directory "/home/<metadot_user>", which should contain the current 'metadot' top-level directory. (<metadot_user> is the name of the system user created to "own" the MetaDot installation. See the new installation instructions for more information. To extract the files, use the following command:

         $bash > tar -zxvf metadotvx.x.tar.gz

This will extract the files into the "metadot" subdirectory (the top-level directory for the portal software) and will overwrite the old version's files. For the remainder of this document, we will use "<METADOT>" to refer to the the top-level metadot directory.

Edit new Metadot configuration file

After unpacking the tarball, you will need to edit Metadot's configuration file, <METADOT>/etc/metadot.conf. See the "Edit Configuration File" section of the installation instructions. You will need to know your existing database's name, user account, and password. If you have forgotten this information, it can be found in the metadot.conf file in your old installation. Don't just copy this old file, as the format has changed. Edit the new file with your information.

Install new Perl modules

Metadot Portal Server requires new Perl modules to be installed on your system. Check the list in Section 4 of the "New Installation" section of this document and make sure you have all the modules listed there installed on your system.

Run upgrade script

You are now ready to run the database upgrade script. The upgrade will fail without it, since the database schema is different from that of 3.1.3.

The upgrade script is located in the Metadot Portal Server distribution in the <METADOT>/metadot/ directory, and is called "upgrade". Change to <METADOT>/metadot and run the script using the following command :
 $bash> perl upgrade
The upgrade script checks your database for any necessary changes and modifies the tables as necessary.

The upgrade script prints a report of what it is doing to the screen. This report will contain some database access errors. These are normal, and are only indications of missing parts of the schema that need to be added. You will know if the upgrade script executed completely because it will tell you it has finished.

Test from the command line

In the <METADOT>/metadot directory, run the command:
  perl index.pl
to ensure that there are no compilation or databases access errors, before you run the code from the web server.

The most common problem experienced at this step is an error about not being able to connect to the database. If this occurs, go back to the previous configuration step and check that the database name, database login name, and database password are correct.

Update the aliases in your web server configuration

The current version of Metadot Portal Server may require additional aliases in your web server configuration. Please refer to the web server configuration instructions to ensure that your configuration is up to date.

Start up the portal

You will need to restart your web server after making the changes above. The exact syntax you will use depends upon your installation.

On linux, it will probably be either:
 $bash> /usr/local/apache/bin/apachectl restart
or, if you are using an older version of apache:
  $bash> /etc/rc.d/init.d/httpd stop
  $bash> /etc/rc.d/init.d/httpd start

See the new installation instructions for more information about (re)starting the Windows IIS server.

Change the Metadot file upload directory

There has been a change in the upload directory handling in Metadot. With Version 4.0, the uploaded attached files for user items are no longer placed in a web-server-accessible directory, but are placed in a non-server-accessible directory, and accessed via CGI scripts. This allows file access to be filtered through Metadot's Access Control capabilities.

Because of this change, you will need to do two things: move the existing user uploaded files to a new location; and change the Metadot configuration to tell it about the new location.

  1. Once the portal is running, log in as 'Admin'. Click on "Enable Editing" and click on Manage...-> Configure from the pulldown menu. This will take you to the main system management page. Click on the "Modify System Params" link. Set
      'absolute path for private file upload directory'
    to be a directory unreachable by the web server, in order to maintain privacy of your data. Make sure this directory exists before you start running the Metadot server. Make sure also that the directory is writable by the user that the web server is configured to use (e.g. on Linux, this will likely be 'nobody'). This is necessary because the server cgi processes will need to add files under this directory.
     
  2. Once you have set the absolute path that you want to use, then move or copy all the directories under <METADOT>/html/files, or whatever directory you were previously using, to this new private upload directory. This will let the portal access the images and download references in the pages in the default initial database.

Apply Customizations

To apply any customizations you made to your previous version of MetaDot to the new version, you will need to edit the affected files and re-insert your custom code.

It is possible that you will have customized a file we made no changes to. In this case, you can simply replace the new version of the file with your customized version. The easiest way to find out if you need to edit the file or can simply replace it is to "diff" the file. You can do this with the following command (all on one line):

$bash > diff /home/metadot_user/metadot/metadot/<newversion_of_file> /home/metadot_user/<backup_directory>/metadot/<oldversion_of_file> > tempfile

This will write the differences between the two version of the file into a file called "tempfile". If the only differences are your customizations (and comments), you can just copy the old file over the new file. If there have been modifications to the file, you will have to merge your changes into the new files.


Special instuctions for upgrading from Version 6.0.x to the most recent version

With version 6.1, the 'default' skin has been refactored into a 'base_skin' and a 'Metadot 6' skin. You must remove the existing 'default' skin, to prevent it from interfering with other skins. At any point in the installation process, delete the files in <METADOT>/sitedata/skins/default, for example (in Linux or UNIX):
  rm -rf <METADOT>/sitedata/skins/default

Be sure to copy the new skins in the tarball's sitedata/skins directory to your production sitedata directory. This should be already be done if you followed the standard upgrade instructions.

Additionally, if you have created any new skins that were based on "default", you may have to modify them so that they are based on "Metadot 6".

 

Back    Next 
Back  Next