[rt-users] Binary Attachments Corrupted in Migration to new box

Mike Patterson mikep at uclink.berkeley.edu
Wed May 10 11:36:41 EDT 2006


My binary attachments (spreadsheets, screenshots, etc..) got corrupted 
after migrating to a new box.

I'm migrating from:
FreeBSD 4.11, RT 3.2.2, MySQL 4.1.7, Apache 1.3.33, Perl 5.8.4, 
mod_perl-1.29, DBI-1.42_1
  --TO-->
RHEL 4.3, RT 3.4.5, MySQL 4.1.2-3, Apache 2.0.52, Perl 5.8.5, 
mod_fastcgi-2.4.2, DBI-1.40-8

Everything else seems fine, but the attachments are corrupt.

How I upgraded:

1) Install RT 3.4.5 on my RHEL box.
2) Dumped  mysql database:
mysqldump --opt --add-drop-table --single-transaction --user=root 
--password=my_pass_was_here rt3 | gzip > /usr/backup/rt3_db_last2.sql.gz
3) deleted the rt3 database on the RHEL box
4) I was initially getting an error message when importing:

ERROR 1153 (08S01) at line 78: Got a packet bigger than
'max_allowed_packet' bytes
mysqldump: Got errno 32 on write
----------------------------

5) I edited /etc/my.cnf (in the [mysqld] section)
#max_allowed_packet = 1M
max_allowed_packet = 16M

6) successfully imported DB:
mysql -p rt3 < rt3_db_last2.sql

7) Ran schema upgrade scripts appropriate for 3.2.2 to 3.4.5
/usr/local/rt3/sbin/rt-setup-database --action schema --datadir 
/usr/local/src/rt-3.4.5/etc/upgrade/3.3.0 --prompt-for-dba-password
/usr/local/rt3/sbin/rt-setup-database --action acl --datadir 
/usr/local/src/rt-3.4.5/etc/upgrade/3.3.0 --prompt-for-dba-password
/usr/local/rt3/sbin/rt-setup-database --action insert --datadir 
/usr/local/src/rt-3.4.5/etc/upgrade/3.3.0 --prompt-for-dba-password
/usr/local/rt3/sbin/rt-setup-database --action schema --datadir 
/usr/local/src/rt-3.4.5/etc/upgrade/3.3.11 --prompt-for-dba-password
/usr/local/rt3/sbin/rt-setup-database --action acl --datadir 
/usr/local/src/rt-3.4.5/etc/upgrade/3.3.11 --prompt-for-dba-password
/usr/local/rt3/sbin/rt-setup-database --action insert --datadir 
/usr/local/src/rt-3.4.5/etc/upgrade/3.3.11 --prompt-for-dba-password

8) Clear mason cache dir:
rm -fr /usr/local/rt3/var/mason_data/obj

9) Stop and start apache:
service httpd stop
service httpd start

10) When I open existing tickets with attachments on the new box they 
are corrupt (e.g. jpg's garbled, downloaded spreadsheets messed-up).

11) If I upload new binary attachments to RT on new box it works fine.

Any suggestions?  I'm guessing this is probably more of a mysql->mysql 
problem, but I'm not sure how to deal with it.

Thanks,
Mike

-- 
Mike Patterson
Systems Manager
UC Berkeley Extension




More information about the rt-users mailing list