Re: [PHP-DB] mysqldump but exclude one table. .. .
[EMAIL PROTECTED] wrote: C:\>mysqldump --version mysqldump Ver 9.09 Distrib 4.0.16, for Win95/Win98 (i32) [snip] Ummm. What version are you using, Martin? David fairly fresh I'm afraid. mysqldump Ver 10.9 Distrib 4.1.9, for pc-linux-gnu (i686) your grep generates... interesting... output :) Useful, but I hope its not default. A quick search on mysql's site isn't giving any indication when this was added - though there is mention of some replication flags with ignore-tables in 4.0.15 - since you're 4.0.16 I'm guessing that's not when it was added. Your other options are to expressly state the tables you want dumped mysqldump [OPTIONS] database [tables] the old fashioned way. You can get listings of the database through php and just have an `ignore` array that skips them when building the dump command. cheers, -- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mysqldump but exclude one table. .
C:\>mysqldump --version mysqldump Ver 9.09 Distrib 4.0.16, for Win95/Win98 (i32) C:\>mysqldump --help | grep table STDIN 6 Dumping definition and data mysql database or table STDIN 7 Usage: mysqldump [OPTIONS] database [tables] STDIN 22--add-drop-tableAdd a 'drop table' before each create. STDIN 31In this case no tables are given. All name arguments are STDIN 41-K, --disable-keys '/*!4 ALTER TABLE tb_name DISABLE KEYS */; and STDIN 42'/*!4 ALTER TABLE tb_name ENABLE KEYS */; will be put STDIN 54-x, --first-slave Locks all tables across all databases. STDIN 61-l, --lock-tables Lock all tables for read. STDIN 65--no-autocommit Wrap tables with autocommit/commit statements. STDIN 67Dump all tables in single transaction to get consistent STDIN 68snapshot. Mutually exclusive with --lock-tables. STDIN 74Don't write table creation info. STDIN 80--opt Same as --add-drop-table --add-locks --all --quick STDIN 81--extended-insert --lock-tables --disable-keys STDIN 88-Q, --quote-names Quote table and column names with a ` STDIN 94-T, --tab=name Creates tab separated textfile for each table to given STDIN 98--tablesOverrides option --databases (-B). STDIN 112 add-drop-tableFALSE STDIN 132 lock-tables FALSE C:\>mysqldump --help | grep ignore nada. Ummm. What version are you using, Martin? David
Re: [PHP-DB] mysqldump but exclude one table. .
Hassan wrote: Hello everyone, I've a reader for sometime now, the best db list ever got into. Well, I'd like to mysqldump a certain database, but with skipping one table, is it possible? [snip] from "mysqldump --help" --ignore-table=name Do not dump the specified table. To specify more than one table to ignore, use the directive multiple times, once for each table. Each table must be specified with both database and table names, e.g. --ignore-table=database.table forgotten, but found using "mysqldump --help | grep table" and some quick scanning - docs are your friend :) cheers, -- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php