[ale] Disable foreign key checks in mysql
Mike Harrison
cluon at geeklabs.com
Tue Sep 25 17:30:48 EDT 2012
> Any suggestions for editing a 37GB file?
> -jt
Lots of ram. 64gb range..
"joe" and other editors will do it if you are patient for swapping chunks.
------------------------------------
If they are dumping that large of stuff and restoring it that way,
I would dump it 'per table' instead of one large table.
IF my individual tables were of that scale,
my backup script would be something like:
mysqldump -d -n -c -u root -pwhatisinaword bigdb foo > foo.create.sql
mysqldump -t -n -u root -pwhatisinaword bigdb foo > foo.data.sql
And then if you want, you can usually split the foo.data.sql file
into lines..
split -l 100000 foo.data.sql foo.data.part
and you restore these individually if careful. Note the lock statements
in the beginning and the end of the split files create.
So to restore:
mysql -u zippy -pdifferentpasswd newdbname <foo.create.sql
mysql -u zippy -pdifferentpasswd newdbname <foo.data.aa
mysql -u zippy -pdifferentpasswd newdbname <foo.data.ab
or some other variation of piping files, etc..
More information about the Ale
mailing list