Paul J Stevens wrote:
The only idea how to make sure everything is OK seams to be to dump the
database. sed s/ the dump file to remove the DROP TABLE IF EXISTS and
CREATE TABLE commands. Create the tables using the create_tables.sql
from latest dbmail and then source the edited dump file.
sed'ing the dump won't be fun though, it's about 14GBytes. Maybe there's
a way to make mysql ignore DROP and CREATE commands while sourcing the
dump?
Sed??
To get rid of the DROP TABLE and CREATE TABLE lines.
Use:
mysqldump --single-transaction --disable-keys --quick dbmail.
This still would include the DROP and CREATE commands, wouldn't it?
And btw, from the 5.0.x manual:
--disable-keys, -K
For each table, surround the INSERT statements with /*!40000 ALTER TABLE
tbl_name DISABLE KEYS */; and /*!40000 ALTER TABLE tbl_name ENABLE KEYS
*/; statements. This makes loading the dump file faster because the
indexes are created after all rows are inserted. >>> This option
is effective for MyISAM tables only. <<<
But actually, drop/reload isn't required. Just make sure the schema are
up-to-date:
mysqladmin create dbmail2
mysqladmin create dbmail3
mysql dbmail2 < create_tables.mysql
mysqldump -d dbmail2 > /tmp/dbmail2.sql
mysqldump -d dbmail > /tmp/dbmail3.sql
mysql dbmail3 < /tmp/dbmail3.sql
diff /tmp/dbmail2.sql /tmp/dbmail3.sql
vi alter.sql
mysql dbmail3 < alter.sql
mysqldump dbmail3 > /tmp/dbmail3.sql
diff ....
etc... until you're satisfied with the alter.sql file.
Thanks for the hint. I'll just do that.
Alex
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail