Open Source Content Management Framework

Upgrade Notes

  1. MidCOM
    1. Upgrading MidCOM 2.6 to 2.8
    2. Upgrading MidCOM 2.4 to 2.6
  2. Midgard
    1. Midgard 8.09 Ragnaroek.
      1. Old Aegir attachment server URLs
    2. Upgrading Midgard from 1.5.0 to 1.6.0 or newer
      1. Attachments Storage Location
      2. Updating Midgard Database
      3. Virtual Host Configuration
      4. Installing Applications

MidCOM

Upgrading MidCOM 2.6 to 2.8

See the Upgrading MidCOM from 2.6 to 2.8 article.

Upgrading MidCOM 2.4 to 2.6

See the Upgrading MidCOM from 2.4 to 2.6 article.

Midgard

Midgard 8.09 Ragnaroek.

Midgard 8.09 Ragnaroek series is not designed to be fully backward compatible with regards to setup upgrades. As of this version, one is able to upgrade setup only from Midgard 1.8 Thor series. If you run older version, upgrade it to 1.8 and then to 8.09.

Upgrade is easy and simple. Once you installed midgard packages, run datagard with upgrade action.

datagard -a upgrade

If tuned configuration must be used (instead of default midgard one) specify it:

datagard -c my_configuration -a upgrade

During upgrade, datagard will:

  • update PEAR if newer is available
  • remove old MidCOM 2.8 PEAR packages
  • install new PEAR packages from ragnaroek channel
  • create new tables (or update existing ones) if needed

If you need to update only database, run datagard with dbupdate action:

datagard -a dbupdate

Read also Installing MidCOM with PEAR, if you need upgrade only pear packages.

Old Aegir attachment server URLs

If you have content (or external links) that still refer to the Aegir attachment server, the easiest way to catch and redirect them is:

Take the attachment servers offline in MySQL:

update host set online=0 where prefix like '/attachment%';

Then catch the attachment server requests and redirect to MidCOM via creating the following code in your code-init-before-midcom page element:

<?php
// Redirect old Aegir attachment server URLs
if (substr($_MIDGARD['uri'], 0, 45) == '/attachment/a193abc6c8ffcd8930d470889cd06714/')
{
    header("Location: /midcom-serveattachmentguid-" . substr($_MIDGARD['uri'], 45));
    header("HTTP/1.1 301 Moved Permanently");
    exit();
}
?>

Where a193abc6c8ffcd8930d470889cd06714 is your sitegroup GUID. Note: This only affects very old Midgard setups.

Upgrading Midgard from 1.5.0 to 1.6.0 or newer

Midgard introduced new midgard-data package with Datagard, the Midgard database and virtual host administration tool. There are some things you should consider (in addition to the current installation instructions) when updating from an older Midgard release to a release 1.6.0 or newer.

Midgard-data provides uniform and good defined way of storing configuration files and blob dirs. midgard-config bash script is a key to define and find the configuration files, as midgard-config --prefix output is used to define all the needed paths. If you compile midgard-core with --with-prefix=/usr/local your main paths will look like: /usr/local/etc, /var/local/lib, etc. Here's the information for midgard-core compiled with /usr as prefix (--with-prefix=/usr).

Attachments Storage Location

Datagard places blobs under /var/lib/midgard/blobs/dbname where dbname is the name of your Midgard database. You should move (or copy if your data is important) your old blob directory to the new location so that datagard will see the attachments when running the database update. Note that making symlink for this location is also good if you for example have no more space on disk partition.

# Replace "/var/www/blobs" with your old blobdir location  
# Replace "midgard" from the end with your Midgard database name  
mv /var/www/blobs /var/lib/midgard/blobs/midgard

Updating Midgard Database

change your old blobdir location before doing this!

When you run Datagard, choose "Update" instead of "Install". Datagard will update your applications keeping your personal data intact.

A backup of your old Midgard database might be a reasonable thing to do here as well.

If you have Multilang enabled (the default) and your database is not in Multilang form, datagard will convert your database to Multilang at this point. You don't have to do anything special. Datagard will do the job for you.

Virtual Host Configuration

Datagard places virtual host configuration files under /etc/midgard/apache/vhosts/hostname_port where hostname is the name and port the port of your virtual host. When you have finished running datagard, check the created virtual host (You choosed to create one, right? If not, create one now by running datagard again. Insert the same settings as in your old virtual host configuration: hostname and port if other than 80, DB name, DB username, DB password.) settings by comparing them to your old configuration and update the new settings when necessary.

One noticeable change in the virtual host configuration is the document root location. Datagard places document root under /var/lib/midgard/vhosts/hostname/port where hostname is the name and port the port of your virtual host. You should either move your files from the old document root to the new one, make symlinks, or change the DocumentRoot directive in the created virtual host configuration file.

Installing Applications

If your database is in Multilang format, please note that you must install all applications with Datagard. Repligard can not import non-Multilang packages to a Multilang enabled database. The packages will need to be converted to Multilang before the import. Datagard handles this automatically. Read the instructions from Installing Additional Packages.

Tagged
ragnaroek
thor
Designed by Nemein, hosted by Anykey