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

Todd Chapman todd at chaka.net
Wed May 10 13:18:22 EDT 2006


Ithin you have to mysqldump with: --default-character-set=binary

-Todd

On Wed, May 10, 2006 at 08:36:41AM -0700, Mike Patterson wrote:
> 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
> 
> _______________________________________________
> 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
> 
> 
> We're hiring! Come hack Perl for Best Practical: 
> http://bestpractical.com/about/jobs.html



More information about the rt-users mailing list