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.
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 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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".