[rt-users] RT at a Glance HASH ref error during upgrade from 3.4 to 3.8

Ruslan Zakirov ruz at bestpractical.com
Wed Aug 6 22:42:11 EDT 2008


On Thu, Aug 7, 2008 at 4:57 AM, Larry Han <lhan at semaphore.com> wrote:
>>Which forum?
> Sorry, I meant the wiki and the mailing list.
Ok.


>>You mean that attahcments worked fine with new RT 3.8.0 on clean DB
>>hosted on mysql 5.0 server?
>>Have you tested old attachments that were in old DB on mysql 4.0?
> When I view the ticket, the correspondence text shows up, aren't those attachments. I cant verify that binary attachments work because I'm fiddling with the perl installation right now and rt is currently not working at all.

You didn't answer either of my questions, but may be that doesn't matter.

>>I think here is problem. Could you share config of your new mysql 5.0
>>and all commands you used to migrate DB from old 4.0 server to 5.0?
>>At this point I can suggest you reimport DB from dump (I think you
>>used mysqldump for migration) using --default-character-set=binary
>>option. Then again apply schema upgrade scrip.
>
> I used the bash script in the wiki to backup my previous database
> http://wiki.bestpractical.com/view/backupRTDB
>
> except this line I had to change to
> mysqldump $rtDB --opt --default-character-set=binary Attachments  | gzip > $attachfullfn
> mysqldump $rtDB --opt  Attachments  | gzip > $attachfullfn
>
> I skipped the gzip and just did >backup.dump and >backup.att
>
> because mysql gave me errors about how binary was not a recognized charset.
That's ok as your old mysql server is 4.0. Read instructions below.

>
> Then on the new server. I imported the files it into the database by
> mysql -p rt3 < backup.dump
> mysql -p rt3 < backup.att
>
>
> Then I ran rt-setup-database --action upgrade
> and then the mysql schema upgrade
>
> perl etc/upgrade/schema.mysql-4.0-4.1.pl rt3 user pass> sql.queries
> mysql -u root -p rt3 < sql.queries
>
> My new mysql 5.0 config is the same as the 4.0 config. Could there lie the problem?
>>At this point I can suggest you reimport DB from dump (I think you
>>used mysqldump for migration) using --default-character-set=binary
>>option. Then again apply schema upgrade scrip.
>
> Are you saying on the import use --default-character-set=binary ?
> How? Like this?
> mysql -p rt3 --default-character-set=binary< backup.att

I think the following steps should make migration for you.

NOTE FOR READERs: this is only correct for people migrating from 4.0
to 4.1 and newer.

1) when you do a mysqldump you don't need additional options, as mysql
4.0 has no --set-default-charset or --set-charset options, so use:

    mysqldump --opt rt3 > rt3.mysql.dump

  or the following to gzip by the way

    mysqldump --opt rt3 | gzip > rt3.mysql.dump.gz

2) Configure your mysql 4.1 or newer to use latin1 as default
character set. I can not explain this, it will take too long.

3) You create new DB for RT in your mysql 4.1 or newer using RT

4) You move the dump file to the server with mysql 4.1 or newer and
restore data using

    mysql --set-default-charset=binary < rt3.mysql.dump

5) You apply upgrade action on this new DB

6) You apply commands generated by schema upgrade script

I think I've covered all possibilities that can corrupt data during migration.

>
>
> Thanks for the help
>
> Larry H
>
> ________________________________________
> From: ruslan.zakirov at gmail.com [ruslan.zakirov at gmail.com] On Behalf Of Ruslan Zakirov [ruz at bestpractical.com]
> Sent: Wednesday, August 06, 2008 5:26 PM
> To: Larry Han
> Cc: rt-users at lists.bestpractical.com
> Subject: Re: [rt-users] RT at a Glance HASH ref error during upgrade from 3.4 to 3.8
>
> On Thu, Aug 7, 2008 at 3:20 AM, Larry Han <lhan at semaphore.com> wrote:
>> I'm in the process of moving and upgrading our RT server from
>> rt 3.4.1
>> mysql 4.0
>> to
>> rt 3.8
>> mysql 5.0
>>
>> I have followed the steps on the forum and I have the database moved over to mysql 5.0
> Which forum?
>
> and everything seems to work including attachments.
> You mean that attahcments worked fine with new RT 3.8.0 on clean DB
> hosted on mysql 5.0 server?
>
> Have you tested old attachments that were in old DB on mysql 4.0?
>
>> I did a mysql dump from the old 4.0 database and then imported the dump into the 5.0 database. Then I applied the 'rt-setup-database --action upgrade' command and then did the mysql schema upgrade.
>
> I think here is problem. Could you share config of your new mysql 5.0
> and all commands you used to migrate DB from old 4.0 server to 5.0?
>
> At this point I can suggest you reimport DB from dump (I think you
> used mysqldump for migration) using --default-character-set=binary
> option. Then again apply schema upgrade scrip.
>
>> All tickets seeem to be present in the current database and all attachments look fine. However, I get the following error in the RT at a glance page.
>>
>> Can't use string ("BQYDAAAAAgQCAAAAAwQDAAAAAgoKTXkg") as a HASH ref while "strict refs" in use at /var/www/tickets01/share/html/Elements/MyRT line 76, line 504.
>>
>> The RT at a Glance config pages show a similar error.
>>
>> Searching google for this error message or parts of this error message return nothing. Is there a step that I forgot to do or something that causes this problem? Do I have a misconfigured or incorrect perl package?
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> Community help: http://wiki.bestpractical.com
>> Commercial support: sales at bestpractical.com
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>> Buy a copy at http://rtbook.bestpractical.com
>>
>
>
>
> --
> Best regards, Ruslan.
>



-- 
Best regards, Ruslan.



More information about the rt-users mailing list