Delete and Recreate Indexes in MySQL to reduce table size for copying the db to a new server?
You asked


  Can I delete the index-file and recreate the indexes on the new server to reduce the copy and tar-time by 50%?


Yes, you can. You copy just the .MYD into the tar file. You will need a blank .MYI file.

SUGGESTION

Suppose you are moving mydata.mytable. You will have


/var/lib/mysql/mydata/mytable.frm
/var/lib/mysql/mydata/mytable.MYD
/var/lib/mysql/mydata/mytable.MYI


STEP 01 : Make Copy of Table Structure

CREATE DATABASE IF NOT EXISTS myjunk;
CREATE TABLE myjunk.mytable LIKE mydata.mytable;


STEP 02 : Copy Real Data and Blank Index File


COPY S1:/var/lib/mysql/mydata/mytable.frm ->  S2:/var/lib/mysql/mydata/mytable.frm
COPY S1:/var/lib/mysql/mydata/mytable.MYD ->  S2:/var/lib/mysql/mydata/mytable.MYD
COPY S1:/var/lib/mysql/myjunk/mytable.MYI ->  S2:/var/lib/mysql/mydata/mytable.MYI


STEP 03 : Rebuild Index File on Target Server

REPAIR TABLE mydata.mytable;


GIVE IT A TRY !!!