On Sat, Mar 14, 2009 at 1:33 AM,  <[email protected]> wrote:
> Looking at the mysqldump man page, one finds no perfect options to do
> so, so instead makes one's own script:
>
> $ mysqldump my_database|
> perl -nwle 'BEGIN{$dontdump="wiki_(objectcache|searchindex)"}
> s/(^-- )(Dumping data for table `$dontdump`$)/$1NOT $2/;
> next if /^LOCK TABLES `$dontdump` WRITE;$/../^UNLOCK TABLES;$/;
> print;'

Why don't you just do:

$ mysqldump --ignore-table=my_database.wiki_objectcache
--ignore-table=my_database.wiki_searchindex my_database

Certainly you can skip objectcache.  searchindex can be rebuilt.  So
can all the *links tables, and the redirect table, and probably some
others.  Of course, rebuilding all these tables on backup restore
might take an awfully long time, which you need to weigh against the
convenience of not having to back them up.

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to