List:General Discussion« Previous MessageNext Message »
From:Aaron Cannon Date:March 1 2007 4:47pm
Subject:Re: [inbox] Re: Breaking Up Tables
View as plain text  
It's nothing to do with MySQL.  split is a command that you can find under 
many flavors of Linux, and Linux-like OSes.

At the shell prompt, type:
man split
to see the documentation.

However, if you have bzip2 on your system, I would recommend running that 
first, in order to compress it as much as possible.

So, to summarize, this is would I would do:

1. run mysqldump to dump my data and save it to a file, for instance, db.sql

2. type:
bzip -9 db.sql
This will give you a file named db.sql.bz2

3. If db.sql.bz2 is still too large, I would run split:
split bla bla bla
(Replace bla bla bla with the options for split.  I never use it, so I don't 
know what they are.)

This will give you a few smaller files named db.sql.bz2.1 db.sql.bz2.2 ETC.

4. Transfer these files to my other machine.

5. reassemble the smaller files into one big file:
cat db.sql.bz2.1 db.sql.bz2.2 db.sql.bz2.3 db.sql.bz2.... \
 >db.sql.bz2

6. decompress the db.sql.bz2 file
bunzip2 db.sql.bz2

 7. import db.sql into wherever.



Hope this helps.

Aaron


--
Skype: cannona
MSN/Windows Messenger: cannona@stripped (don't send email to the hotmail 
address.)
----- Original Message ----- 
From: <tonylabarbara@stripped>
To: <mysql@stripped>
Sent: Thursday, March 01, 2007 9:15 AM
Subject: Re: [inbox] Re: Breaking Up Tables


> -----Original Message-----
> From: eugenem@stripped
> To: mysql@stripped
> Sent: Thu, 1 Mar 2007 10:35 AM
> Subject: Re: [inbox] Re: Breaking Up Tables
>
>>if you have shell access on the server, why not just use
>>split? Create your big dump file, split it into smaller
>>chunks and use cat on the other end to reassemble the pieces.
>>if you don't, just have someone at your host provider who does
>>do it.
>
> Sounds perfect! I just spent 10 minutes trying to research splitting in 
> the MySQL Ref. Man. and couldn't find anything. Can you point me, or give 
> me a sample command? Also to re-stitch it together on the other end?
> TIA,
> Tony
> ________________________________________________________________________
> AOL now offers free email to everyone.  Find out more about what's free 
> from AOL at AOL.com.
> 

Thread
Breaking Up Tablestonylabarbara1 Mar
  • Re: Breaking Up TablesDuncan Hill1 Mar
    • Re: Breaking Up Tablestonylabarbara1 Mar
      • Re: Breaking Up TablesDuncan Hill1 Mar
        • Re: Breaking Up Tablestonylabarbara1 Mar
          • Re: Breaking Up TablesFagyal Csongor1 Mar
          • Re: [inbox] Re: Breaking Up TablesEugene Mah1 Mar
            • Re: [inbox] Re: Breaking Up Tablestonylabarbara1 Mar
  • RE: Breaking Up TablesTim Lucia1 Mar
  • Re: [inbox] Re: Breaking Up TablesAaron Cannon1 Mar
    • Re: [inbox] Re: Breaking Up Tablestonylabarbara1 Mar
  • RE: Breaking Up TablesGary W. Smith1 Mar