Re: restoring data into mysql
am 01.02.2006 20:49:02 von Bill Karwin
"Shiraz" wrote in message
news:1138821766.896886.138200@g44g2000cwa.googlegroups.com.. .
>i did "select * into outfile 'data.sql' from CDRS" to backup my data.
> what is the reverse to get the data back in? it looks liek the fields
> are delimited by tabs in the file.
"LOAD DATA INFILE"
http://dev.mysql.com/doc/refman/5.0/en/load-data.html
Are you aware that mysqldump can back up individual tables? I know you said
in a past thread that your database is large (~250GB) but you can use
mysqldump in a manner similarly to your "into outfile" usage -- to back up
one table at a time.
You can also use a shell pipe to compress the output of mysqldump before it
writes it to disk. For example:
mysqldump ...options... | gzip > mybackup.sql.gz
Then uncompress it during restore:
gzcat mybackup.sql.gz | mysql ...options...
Regards,
Bill K.