3.3. Upgrading the OTRS Framework

From open-support.info

< Book:OTRS 3.0 - Admin Manual | Chapter 3(Difference between revisions)
Jump to: navigation, search
m (15.Check for customized PreferencesGroups entries)
m (1 revision: Update book/figure)
 
(14 intermediate revisions not shown)
Line 7: Line 7:
|author=Dick6809
|author=Dick6809
}}
}}
-
<onlyinclude>__NOTOC__
+
<onlyinclude>These instructions are for people upgrading OTRS from version 2.4 to 3.0, and apply both for RPM and source code (tarball) upgrades.  
-
These instructions are for people upgrading OTRS from version 2.4 to 3.0, and apply both for RPM and source code (tarball) upgrades.  
+
If you are running a lower version of OTRS, you have to follow the upgrade path to 2.4 first (1.1->1.2->1.3->2.0->2.1->2.2->2.3->2.4->3.0 ...).  
If you are running a lower version of OTRS, you have to follow the upgrade path to 2.4 first (1.1->1.2->1.3->2.0->2.1->2.2->2.3->2.4->3.0 ...).  
Line 14: Line 13:
If you need to do a "patch level upgrade", which is an upgrade for instance from OTRS version 3.0.3 to 3.0.4, you should skip steps 8, 9, 10, and 13 - 16.  
If you need to do a "patch level upgrade", which is an upgrade for instance from OTRS version 3.0.3 to 3.0.4, you should skip steps 8, 9, 10, and 13 - 16.  
 +
<ol>
 +
<li>
 +
Stop all relevant services
-
==== 1. Stop all relevant services ====
 
e.g. (depends on used services):  
e.g. (depends on used services):  
<pre>
<pre>
Line 22: Line 23:
shell> /etc/init.d/apache stop
shell> /etc/init.d/apache stop
</pre>
</pre>
 +
<br />
 +
</li>
-
==== 2. Backup everything below $OTRS_HOME (default: OTRS_HOME=/opt/otrs): ====
+
<li>
 +
Backup everything below $OTRS_HOME (default: OTRS_HOME=/opt/otrs):
* Kernel/Config.pm
* Kernel/Config.pm
* Kernel/Config/GenericAgent.pm
* Kernel/Config/GenericAgent.pm
Line 29: Line 33:
* var/*
* var/*
* as well as the database
* as well as the database
 +
<br />
 +
</li>
-
==== 3. Backup the database. ====
+
<li>
 +
Backup the database.
 +
<br /><br />
 +
</li>
-
==== 4. If possible, try this install on a separate machine for testing first. ====
+
<li>
 +
If possible, try this install on a separate machine for testing first.
 +
<br /><br />
 +
</li>
-
==== 5. Install the new release (tar or RPM). ====
+
<li>
 +
Install the new release (tar or RPM).
* With the tarball:
* With the tarball:
 +
<ol style="list-style-image:none">
<pre>
<pre>
shell> cd /opt
shell> cd /opt
Line 41: Line 55:
shell> ln -s otrs-x.x.x otrs
shell> ln -s otrs-x.x.x otrs
</pre>
</pre>
-
:Restore old config files.
+
Restore old config files.
-
:* Kernel/Config.pm
+
* Kernel/Config.pm
-
:* Kernel/Config/GenericAgent.pm
+
* Kernel/Config/GenericAgent.pm
-
:* Kernel/Config/Files/ZZZAuto.pm
+
* Kernel/Config/Files/ZZZAuto.pm
 +
</ol>
-
* With the RPM:  
+
* With the RPM:
 +
<ol style="list-style-image:none">
<pre>
<pre>
shell> rpm -Uvh otrs-x.x.x.-01.rpm
shell> rpm -Uvh otrs-x.x.x.-01.rpm
</pre>
</pre>
-
<ul style="list-style-image:none;">
 
Restore old config files not needed, done by RPM.
Restore old config files not needed, done by RPM.
-
</ul>
+
</ol>
 +
<br />
 +
</li>
-
==== 6. Own themes ====
+
<li>
-
Note: The OTRS themes between 2.4 and 3.0 are _not_ compatible, so don't use your old themes)! Themes are located under $OTRS_HOME/Kernel/Output/HTML/*/*.dtl (default: OTRS_HOME=/opt/otrs)  
+
Own themes
 +
<br /><br />
 +
{{fmbox
 +
|text= The OTRS themes between 2.4 and 3.0 are _not_ compatible, so don't use your old themes)! Themes are located under $OTRS_HOME/Kernel/Output/HTML/*/*.dtl (default: OTRS_HOME=/opt/otrs)  
 +
}}
 +
<br />
 +
</li>
 +
<li>
 +
Set file permissions
-
==== 7. Set file permissions ====
 
If the tarball is used, execute:  
If the tarball is used, execute:  
<pre>
<pre>
Line 66: Line 90:
</pre>
</pre>
with the permissions needed for your system setup.  
with the permissions needed for your system setup.  
 +
<br /><br />
 +
</li>
-
 
+
<li>
-
==== 8. Apply the database changes (part 1/2) ====
+
Apply the database changes (part 1/2)
<pre>
<pre>
shell> cd /opt/otrs/
shell> cd /opt/otrs/
Line 77: Line 103:
shell> cat scripts/DBUpdate-to-3.0.postgresql.sql | psql otrs
shell> cat scripts/DBUpdate-to-3.0.postgresql.sql | psql otrs
</pre>
</pre>
 +
<br />
 +
</li>
 +
<li>
 +
Run the migration script (as OTRS user, _not_ as root):
-
==== 9. Run the migration script (as OTRS user, _not_ as root): ====
 
You must execute the migration script to migrate some data from the old database structure to the new one. Please run:
You must execute the migration script to migrate some data from the old database structure to the new one. Please run:
<pre>
<pre>
shell> scripts/DBUpdate-to-3.0.pl
shell> scripts/DBUpdate-to-3.0.pl
</pre>
</pre>
 +
<br />
 +
</li>
-
==== 10. Apply the database changes (part 2/2): ====
+
<li>
 +
Apply the database changes (part 2/2):
<pre>
<pre>
# MySQL:
# MySQL:
Line 92: Line 124:
shell> cat scripts/DBUpdate-to-3.0-post.postgresql.sql | psql otrs
shell> cat scripts/DBUpdate-to-3.0-post.postgresql.sql | psql otrs
</pre>
</pre>
 +
<br />
 +
</li>
-
==== 11. Refresh the configuration and delete caches. Please run: ====
+
<li>
 +
Refresh the configuration and delete caches. Please run:
<pre>
<pre>
shell> bin/otrs.RebuildConfig.pl
shell> bin/otrs.RebuildConfig.pl
shell> bin/otrs.DeleteCache.pl
shell> bin/otrs.DeleteCache.pl
</pre>
</pre>
 +
<br />
 +
</li>
 +
 +
<li>
 +
Restart your services
-
==== 12. Restart your services ====
 
e.g. (depends on used services):  
e.g. (depends on used services):  
<pre>
<pre>
Line 106: Line 145:
shell> /etc/init.d/apache start
shell> /etc/init.d/apache start
</pre>
</pre>
 +
<br />
 +
</li>
 +
 +
<li>
 +
Check for encoding issues
-
==== 13. Check for encoding issues ====
 
With OTRS 3.0, the default charset of OTRS was changed from "iso-8859-1" to "utf-8".  
With OTRS 3.0, the default charset of OTRS was changed from "iso-8859-1" to "utf-8".  
Line 122: Line 165:
OTRS 3.1 will only allow UTF-8 as internal charset.  
OTRS 3.1 will only allow UTF-8 as internal charset.  
 +
<br /><br />
 +
</li>
 +
 +
<li>
 +
Check for Custom Frontend Module Registrations
-
==== 14. Check for Custom Frontend Module Registrations ====
 
Starting with OTRS 3.0, application modules may have their own special CSS and/or JavaScript. This is part of the so-called frontend module registration of the modules in the SysConfig. This may cause problems during the upgrade, because locally modified frontend module configuration settings will not catch the updates of the new default configuration.  
Starting with OTRS 3.0, application modules may have their own special CSS and/or JavaScript. This is part of the so-called frontend module registration of the modules in the SysConfig. This may cause problems during the upgrade, because locally modified frontend module configuration settings will not catch the updates of the new default configuration.  
Line 134: Line 181:
The same procedure must be executed for the setting "Frontend::ToolBarModule###1-Ticket::TicketSearchFulltext", as this now also uses module specific CSS. If this setting is not activated on your system, you can safely omit this step.  
The same procedure must be executed for the setting "Frontend::ToolBarModule###1-Ticket::TicketSearchFulltext", as this now also uses module specific CSS. If this setting is not activated on your system, you can safely omit this step.  
 +
<br /><br />
 +
</li>
 +
 +
<li>
 +
Check for customized PreferencesGroups entries
-
==== 15.Check for customized PreferencesGroups entries ====
 
With OTRS 3.0, there were a few corrections in PreferencesGroups configuration entries. Notably, the keys 'Activ' and 'Colum' were changed to 'Active' and 'Column', respectively. You only need to take action if you have customized such settings on your system, otherwise they will be updated automatically.  
With OTRS 3.0, there were a few corrections in PreferencesGroups configuration entries. Notably, the keys 'Activ' and 'Colum' were changed to 'Active' and 'Column', respectively. You only need to take action if you have customized such settings on your system, otherwise they will be updated automatically.  
-
To check if you are affected, please look at the file Kernel/Config/Files/ZZZAuto.pm and look for entries like:  
+
To check if you are affected, please look at the file Kernel/Config/Files/ZZZAuto.pm and look for entries like:
 +
<pre>
     $Self->{'CustomerPreferencesGroups'}->{'RefreshTime'} =  {
     $Self->{'CustomerPreferencesGroups'}->{'RefreshTime'} =  {
       'Activ' => '0',
       'Activ' => '0',
Line 156: Line 208:
       'Prio' => '4000'
       'Prio' => '4000'
     };
     };
-
 
+
</pre>
This needs to be changed as follows:  
This needs to be changed as follows:  
-
 
+
<pre>
     $Self->{'CustomerPreferencesGroups'}->{'RefreshTime'} =  {
     $Self->{'CustomerPreferencesGroups'}->{'RefreshTime'} =  {
       'Active' => '0',
       'Active' => '0',
Line 176: Line 228:
       'Prio' => '4000'
       'Prio' => '4000'
     };
     };
 +
</pre>
 +
<br />
 +
</li>
 +
 +
<li>
 +
Customer Database Backend Field Renaming
-
==== 16. Customer Database Backend Field Renaming ====
 
The field 'salutation' in the built-in customer database has been renamed to the more appropriate 'title'. If you are using the built-in database data source for customers, and you have changed the configuration, for instance because you've added fields to the customer table, or because you've enabled Customer Company support, you should change the mapping in your Kernel/Config.pm:  
The field 'salutation' in the built-in customer database has been renamed to the more appropriate 'title'. If you are using the built-in database data source for customers, and you have changed the configuration, for instance because you've added fields to the customer table, or because you've enabled Customer Company support, you should change the mapping in your Kernel/Config.pm:  
Line 190: Line 247:
Please note that this can also affect any salutations or other templates where you've used the string <OTRS_*_UserSalutation>. If you have used this string AND you use the built-in customer table, please replace it with <OTRS_CURRENT_UserTitle> instead.  
Please note that this can also affect any salutations or other templates where you've used the string <OTRS_*_UserSalutation>. If you have used this string AND you use the built-in customer table, please replace it with <OTRS_CURRENT_UserTitle> instead.  
 +
<br /><br />
 +
</li>
 +
 +
<li>
 +
Optional: Mark Tickets as Read
-
==== 17. Optional: Mark Tickets as Read ====
 
In OTRS 3.0 there is a new feature: new tickets and new articles which an Agent did not read yet are highlighted as 'unread'. For all tickets which were created before the upgrade to OTRS 3.0, the 'read' information is missing, and therefore these tickets will be marked as 'unread'. If this bothers you, you can use a script to set all tickets and articles as read for all agents which have read permissions for these tickets. Note that this script may run for a while!  
In OTRS 3.0 there is a new feature: new tickets and new articles which an Agent did not read yet are highlighted as 'unread'. For all tickets which were created before the upgrade to OTRS 3.0, the 'read' information is missing, and therefore these tickets will be marked as 'unread'. If this bothers you, you can use a script to set all tickets and articles as read for all agents which have read permissions for these tickets. Note that this script may run for a while!  
<pre>
<pre>
shell> bin/otrs.MarkTicketAsSeen.pl
shell> bin/otrs.MarkTicketAsSeen.pl
</pre>
</pre>
 +
<br />
 +
</li>
-
==== 18. Well done!
+
<li>
-
</onlyinclude>
+
Well done!
 +
<br />
 +
</li>
 +
</ol></onlyinclude>

Latest revision as of 05:23, 24 April 2011

These instructions are for people upgrading OTRS from version 2.4 to 3.0, and apply both for RPM and source code (tarball) upgrades.

If you are running a lower version of OTRS, you have to follow the upgrade path to 2.4 first (1.1->1.2->1.3->2.0->2.1->2.2->2.3->2.4->3.0 ...).

If you need to do a "patch level upgrade", which is an upgrade for instance from OTRS version 3.0.3 to 3.0.4, you should skip steps 8, 9, 10, and 13 - 16.

  1. Stop all relevant services e.g. (depends on used services):
    shell> /etc/init.d/cron stop
    shell> /etc/init.d/postfix stop
    shell> /etc/init.d/apache stop
    


  2. Backup everything below $OTRS_HOME (default: OTRS_HOME=/opt/otrs):
    • Kernel/Config.pm
    • Kernel/Config/GenericAgent.pm
    • Kernel/Config/Files/ZZZAuto.pm
    • var/*
    • as well as the database

  3. Backup the database.

  4. If possible, try this install on a separate machine for testing first.

  5. Install the new release (tar or RPM).
    • With the tarball:
      shell> cd /opt
      shell> tar -xzf otrs-x.x.x.tar.gz
      shell> ln -s otrs-x.x.x otrs
      

      Restore old config files.

      • Kernel/Config.pm
      • Kernel/Config/GenericAgent.pm
      • Kernel/Config/Files/ZZZAuto.pm


    • With the RPM:
      shell> rpm -Uvh otrs-x.x.x.-01.rpm
      

      Restore old config files not needed, done by RPM.


  6. Own themes


  7. Set file permissions If the tarball is used, execute:
    shell> cd /opt/otrs/
    shell> bin/otrs.SetPermissions.pl
    

    with the permissions needed for your system setup.

  8. Apply the database changes (part 1/2)
    shell> cd /opt/otrs/
    
    # MySQL:
    shell> cat scripts/DBUpdate-to-3.0.mysql.sql | mysql -p -f -u root otrs
    # PostgreSQL:
    shell> cat scripts/DBUpdate-to-3.0.postgresql.sql | psql otrs
    


  9. Run the migration script (as OTRS user, _not_ as root): You must execute the migration script to migrate some data from the old database structure to the new one. Please run:
    shell> scripts/DBUpdate-to-3.0.pl
    


  10. Apply the database changes (part 2/2):
    # MySQL:
    shell> cat scripts/DBUpdate-to-3.0-post.mysql.sql | mysql -p -f -u root otrs
    # PostgreSQL:
    shell> cat scripts/DBUpdate-to-3.0-post.postgresql.sql | psql otrs
    


  11. Refresh the configuration and delete caches. Please run:
    shell> bin/otrs.RebuildConfig.pl
    shell> bin/otrs.DeleteCache.pl
    


  12. Restart your services e.g. (depends on used services):
    shell> /etc/init.d/cron start
    shell> /etc/init.d/postfix start
    shell> /etc/init.d/apache start
    


  13. Check for encoding issues With OTRS 3.0, the default charset of OTRS was changed from "iso-8859-1" to "utf-8". This will only affect you if you did not specify a charset in Kernel/Config.pm (all installations that were made with the web installer have a custom setting there) or if you didn't change the default charset in the AdminSysConfig. If you experience problems with the new charset, add this line to Kernel/Config.pm:
        $Self->{'DefaultCharset'} = 'iso-8859-1';
    

    In general, using "utf-8" is the recommended mode of running OTRS, and switching from "iso-8859-1" should work well.

    Please note: We recommend to change existing non-UTF-8 installations of OTRS to UTF-8 with the upgrade to 3.0. All other encodings are now deprecated.

    OTRS 3.1 will only allow UTF-8 as internal charset.

  14. Check for Custom Frontend Module Registrations Starting with OTRS 3.0, application modules may have their own special CSS and/or JavaScript. This is part of the so-called frontend module registration of the modules in the SysConfig. This may cause problems during the upgrade, because locally modified frontend module configuration settings will not catch the updates of the new default configuration. To check if you are affected, please look at the file Kernel/Config/Files/ZZZAuto.pm and look for entries like
        $Self->{'Frontend::Module'}->{'AgentStats'} = { ... };
    

    These settings should be reset to their default value in Admin -> SysConfig (in this case: 'Frontend::Module###AgentStats') with the little "Reset" button next to the "Active" checkbox. Then the settings will be reset with the new module-specific settings and no longer show up in Kernel/Config/Files/ZZZAuto.pm. After this procedure, you may customize these settings again, if needed.

    The same procedure must be executed for the setting "Frontend::ToolBarModule###1-Ticket::TicketSearchFulltext", as this now also uses module specific CSS. If this setting is not activated on your system, you can safely omit this step.

  15. Check for customized PreferencesGroups entries With OTRS 3.0, there were a few corrections in PreferencesGroups configuration entries. Notably, the keys 'Activ' and 'Colum' were changed to 'Active' and 'Column', respectively. You only need to take action if you have customized such settings on your system, otherwise they will be updated automatically. To check if you are affected, please look at the file Kernel/Config/Files/ZZZAuto.pm and look for entries like:
        $Self->{'CustomerPreferencesGroups'}->{'RefreshTime'} =  {
          'Activ' => '0',
          'Colum' => 'Frontend',
          'Data' => {
            '' => 'off',
            '10' => '10 minutes',
            '15' => '15 minutes',
            '2' => ' 2 minutes',
            '5' => ' 5 minutes',
            '7' => ' 7 minutes'
          },
          'Desc' => 'Select your QueueView refresh time.',
          'Label' => 'QueueView refresh time',
          'Module' => 'Kernel::Output::HTML::PreferencesGeneric',
          'PrefKey' => 'UserRefreshTime',
          'Prio' => '4000'
        };
    

    This needs to be changed as follows:

        $Self->{'CustomerPreferencesGroups'}->{'RefreshTime'} =  {
          'Active' => '0',
          'Column' => 'Frontend',
          'Data' => {
            '' => 'off',
            '10' => '10 minutes',
            '15' => '15 minutes',
            '2' => ' 2 minutes',
            '5' => ' 5 minutes',
            '7' => ' 7 minutes'
          },
          'Desc' => 'Select your QueueView refresh time.',
          'Label' => 'QueueView refresh time',
          'Module' => 'Kernel::Output::HTML::PreferencesGeneric',
          'PrefKey' => 'UserRefreshTime',
          'Prio' => '4000'
        };
    


  16. Customer Database Backend Field Renaming The field 'salutation' in the built-in customer database has been renamed to the more appropriate 'title'. If you are using the built-in database data source for customers, and you have changed the configuration, for instance because you've added fields to the customer table, or because you've enabled Customer Company support, you should change the mapping in your Kernel/Config.pm: Change this line:
         [ 'UserSalutation', 'Salutation', 'salutation', 1, 0, 'var', '', 0 ],
    

    to:

         [ 'UserTitle',      'Title',      'title',      1, 0, 'var', '', 0 ],
    

    Please note that this can also affect any salutations or other templates where you've used the string <OTRS_*_UserSalutation>. If you have used this string AND you use the built-in customer table, please replace it with <OTRS_CURRENT_UserTitle> instead.

  17. Optional: Mark Tickets as Read In OTRS 3.0 there is a new feature: new tickets and new articles which an Agent did not read yet are highlighted as 'unread'. For all tickets which were created before the upgrade to OTRS 3.0, the 'read' information is missing, and therefore these tickets will be marked as 'unread'. If this bothers you, you can use a script to set all tickets and articles as read for all agents which have read permissions for these tickets. Note that this script may run for a while!
    shell> bin/otrs.MarkTicketAsSeen.pl
    


  18. Well done!
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox