Upgrading from 3.0.7 to 3.1.5 on Windows

Moderator: crythias

Locked
guillo
Znuny newbie
Posts: 98
Joined: 16 May 2012, 20:05
Znuny Version: 3.0.7

Upgrading from 3.0.7 to 3.1.5 on Windows

Post by guillo »

I'm given the task to upgrade OTRS 3.0.7 running on a windows 2008 server to the new version 3.1.5 and I have absolutely no idea how.

So as far as I understand we have to do 4 simple steps

1. Back up the database.
2. Uninstall OTRS
3. Instal the New OTRS version
4. Restore the database
4.1 Live happily ever after.

Steps 1 and 4 I have no idea how. I've trying with mysqldump --all-databases > backupfile.sql from the command line, but it generates only a 2k *.sql file... I open it with notepad and I see no data (agent names, etc). *

So please, if somebody can shed some light or point me in the right direction I would really appreciate it.

So far I know that I have to backup the database, the config files from the OTRS system administrator and even the ZZZAuto.pl, ZZZAAuto.pl ... am i right?
Last edited by guillo on 06 Jul 2012, 20:47, edited 3 times in total.
OTRS V 3.0.7 Windows 2008 x64 going for 3.1.7
OTRS 3.1.12 on LINUX UBUNTU SERVER
CSL
Znuny expert
Posts: 159
Joined: 11 Nov 2011, 19:27
Znuny Version: 3.0.11

Re: Upgrading from 3.0.7 to 3.1.5

Post by CSL »

the OTRS expert disappeared and left no documentation... nothing.
You'd think they would have squeezed something from him; not a fun situation to be in :-/

Yes you are right on the basics of the procedure. There is an UPGRADING file inside the OTRS dir that gives instructions on how to do this. As for your DB dump, you may have to specify the max-allowed-packet size, as OTRS stores attachments etc in the DB, and mysqldump doesn't read the value given for this from the config file as you might expect.

Have a look at your my.cnf file (probably inside C:\prog files\OTRS\mysql\etc\my.cnf or similar) for a max-allowed-packet size, and specify this when dumping the DB like mysqldump --max-alowed-packet=xxxx

Back up the entire directory before you go ahead. The UPGRADING instruction file tells you which files to migrate across to the new installation. It's pretty much the following, assuming you don't have extensive modifications / code changes to worry about:
/otrs/Kernel/Config/Files/ZZZAuto.pm (this file contains your sysconfig changes. ZZZAAuto.pm contains the default settings and will not change).
/otrs/Kernel/Config.pm

If you have a separate ACL file (/otrs/Kernel/Config/Files/ACL.pm) then this will have to migrate over as well.

One thing that tripped me up (and isn't warned about in UPGRADING!) is if you are using autoincrement ticket numbering. If you are, you will need /otrs/var/log/TicketCounter.log migrated across, or your system will attempt to start numbering new tickets from 0 (it wont overwrite existing tickets, but will use any freed numbers it finds).

If you have any custom skins / themes then you may need /otrs/var/httpd/htdocs/skins/Agent/yourskin

There may be more depending on your setup. Best thing to do would be to create a test system with an exact copy of the database and application dir, and to try upgrading that. You'll probably learn allot doing so (just as I did) and will be in much better shape to touch production.
Backend: OTRS 3.0.11 RedHat Enterprise Linux 6.2, Apache, MySQL with replication
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL
guillo
Znuny newbie
Posts: 98
Joined: 16 May 2012, 20:05
Znuny Version: 3.0.7

Re: Upgrading from 3.0.7 to 3.1.5

Post by guillo »

Thanks a lot, this is of great help. I'll will try it and let you know how it came out.
OTRS V 3.0.7 Windows 2008 x64 going for 3.1.7
OTRS 3.1.12 on LINUX UBUNTU SERVER
guillo
Znuny newbie
Posts: 98
Joined: 16 May 2012, 20:05
Znuny Version: 3.0.7

Re: Upgrading from 3.0.7 to 3.1.5

Post by guillo »

So I read the instructions included inside the OTRS UPGRADING file, too bad those instructions are for LINUX :(

The processes must be quite the same I guess. ..
OTRS V 3.0.7 Windows 2008 x64 going for 3.1.7
OTRS 3.1.12 on LINUX UBUNTU SERVER
guillo
Znuny newbie
Posts: 98
Joined: 16 May 2012, 20:05
Znuny Version: 3.0.7

Re: Upgrading from 3.0.7 to 3.1.5

Post by guillo »

So I found this article about upgrading version 2.4.9 to 3.0.5 beta, it is in spanish so I'll translate it and explain where the problem is:
I'm trying to use this same steps to upgrade from 3.0.7 to 3.1.6.
My comments go preceded by an **
----
1. Pre-requirements

- To have a previous version of OTRS installed *(duh!)
- Make a backup of the OTRS folder ALL OF IT!
- Make a backup of the System configuration (Admin > System Configuration > save configuration
- Make a database back up. From the windows console:
+ Go to OTRS\MySQL\bin
+ execute mysqldump -u -root -p --opt otrs >C:\database_backup.sql

2. Get the latest OTRS Version **(in my case 3.1.6)

3. Stop all OTRS services and uninstall version 2.4.9 **(3.0.7 in my case)

4. Install the new version but deactivate the "Continue with web installation" and FINISH the installation. Don't open OTRS jet.
a) Create the database: Using windows console, go to CD C:\Program files\OTRS\MySQL\bin and
Execute:
mysql - root
Now we are inside MYSQL, now try to create the database.

- mysql> create database otrs character set utf8;
- press Ctrl + C to exit mysql and go back to the console.

Back on Windows Console and located an the \otrs\mysql\bin execute
- \otrs\mysql\bin > mysql -u root -e "GRANT all ON otrs.* TO 'otrs'@'localhost' IDENTIFIED BY 'test'" && mysql -uroot -e "FLUSH PRIVILEGES"

Now restore the database from version 2.4.9 as follows **(here is where my problems begin, so far I've been following all these steps with no problem at all)

- From the windows console, go to \OTRS\MySQL\bin
- Execute the following comand: mysql -u root otrs <> **(Here i get the following message " > was unexpected")
- This should have restored the data from your previous version to the new one **(really :? ?? )

**this is where it gets really confusing, even in Spanish.

Now copy the following files from your previous OTRS installation (the backup that you made) and replace those that were installed with version 3. (In other words, replace the old ones with the new ones). ** WHAT???? :shock:

- OTRS\OTRS\Kernel\Config.pm [Open the file using notepad and change on line 62 the location of the new OTRS] Then replace the old config.pm with the new one.
- OTRS\OTRS\Kernel\GenericAgent.pm Replace the old one from the 2.4.9 version with the new one.
- OTRS\OTRS\Kernel\ZZZAAuto.pm and replace the old one from 2.4.9. Version with the new one.

b) Migrating to version 3.0.5 and updating the OTRS Framework

The updating process is incremental, for example, if we were using version 2.2, we should instal version 2.3, 2.4 and so on, but for our case we'll go straight to 3.0 (2.4.9 to 3.0). We have to run the following scripts located at OTRS\OTRS\Scripts **(since I'm going from 3.0.x version to a 3.1.x version I'm not going trough this, right?? )

- DBUpdate-to-3.0.mysql.sql
- DBUpdate-to-3.0.pl
- DBUpdate-to-3.0-post.mysql.sql

After executing the scripts one or two errors is normal.

Now you can log on your new OTRS using your old credentials.

Finally, without uninstalling the previous packages, reinstall those from the new version and any compatibility warning will go away.

---- Source: http://migueleonardortiz.blogspot.mx/20 ... -beta.html

So... what do you think??? I believe that is on the right track but a few steps are missing or miss written.
OTRS V 3.0.7 Windows 2008 x64 going for 3.1.7
OTRS 3.1.12 on LINUX UBUNTU SERVER
CSL
Znuny expert
Posts: 159
Joined: 11 Nov 2011, 19:27
Znuny Version: 3.0.11

Re: Upgrading from 3.0.7 to 3.1.5

Post by CSL »

I wouldn't look to a document you've found somewhere and translated for instructions where there are official ones for upgrading on windows. Your best bet is always to start with the official docs, no matter how sparse they may be:

http://doc.otrs.org/3.0/en/html/upgrade ... aller.html

http://faq.otrs.org/otrs/public.pl?Acti ... ItemID=351

Some of the commands you posted in that translation won't work at all. This line: "mysql -u root otrs <>" is plain wrong. It would be best to understand command piping and redirection, and then you would also be able to see that it will never work: http://technet.microsoft.com/en-us/libr ... 90982.aspx

Don't worry so much about version numbers when dealing with Windows. Because you basically have to uninstall and then re-install, it doesn't matter what versions the guide was written for. Instructions for 2.4.7 - 2.4.8 will work fine for 3.0.10 - 3.0.11. The main thing you will have to account for are what database upgrade scripts to run. If you are going from 3.0.x to 3.1.x, then it would be the scripts with "DBUpdate-to-3.1." in their name.

You still have to follow the upgrade path though, so you can't skip any major version changes. This is covered inside the UPGRADING file. Even though it is written for linux, allot of the principals and restrictions still apply:
If you are running a lower version of OTRS you have to follow the upgrade path
to 3.0 first (1.1->1.2->1.3->2.0->2.1->2.2->2.3->2.4->3.0->3.1 ...)!
You can upgrade in one step from your 3.0.x to 3.1.x so you don't need to worry about this.

These statements are mixed up and the wrong way around:
- OTRS\OTRS\Kernel\Config.pm [Open the file using notepad and change on line 62 the location of the new OTRS] Then replace the old config.pm with the new one.
- OTRS\OTRS\Kernel\GenericAgent.pm Replace the old one from the 2.4.9 version with the new one.
- OTRS\OTRS\Kernel\ZZZAAuto.pm and replace the old one from 2.4.9. Version with the new one.
As I said in my original post, it should be your old (customized ones) going over the new, default ones, otherwise how will you migrate your settings across?

You're nearly there, try following the official guidelines and see how you get on.
Backend: OTRS 3.0.11 RedHat Enterprise Linux 6.2, Apache, MySQL with replication
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL
guillo
Znuny newbie
Posts: 98
Joined: 16 May 2012, 20:05
Znuny Version: 3.0.7

Re: Upgrading from 3.0.7 to 3.1.5

Post by guillo »

Wow Thanks! I feel better now that I know that I don't have to go trough all the 3.0.7, 3.0.8, 3.0.9.....3.1.5
I knew something was wrong with that article, from what you told me, that dude probably translated it as well from somewhere else.

i have a big problem with the official instructions for windows, first:
There is currently no in-place upgrade tool available for OTRS installations that were done with the Windows Installer. The upgrade process basically consists of backing up the database and the filesystem, uninstalling OTRS, installing the new version, restoring the database and running the upgrade procedure if needed.
Upgrading is described in FAQ# 4200351, and there is also an informative YouTube video available.
That's not a set of instructions.That's more like a.. statement telling me that if I'm on Windows I'm on my own.

And second, that FAQ is for version 2.3 to 2.4 quite old (but this rises my question if these procedures are still valid with the latest versions).

From what I've learned here, the process is very straight forward, I see that I'm stuck with the database dump and restore (the most critical part anyway). Once I figure it out, I'll write this huge detailed manual and post it here for sure.

CSL. I really appreciate your help and thanks for sticking with me.





(*Franki estas leyendo esto?)
OTRS V 3.0.7 Windows 2008 x64 going for 3.1.7
OTRS 3.1.12 on LINUX UBUNTU SERVER
DaRocco
Znuny newbie
Posts: 3
Joined: 29 Jul 2013, 15:33
Znuny Version: 3.2.9

Re: Upgrading from 3.0.7 to 3.1.5 on Windows

Post by DaRocco »

FAQ# 4200351 comes "no permission"
Locked