Contrib/ Bugzilla Stripping Tool

David Miller justdave at bugzilla.org
Mon Jul 14 02:03:18 UTC 2008


Joel Peshkin wrote on 7/8/08 1:16 PM:

>   I'm just in the process of splitting of a set of products that have
> been sold to another company so that there is a copy of the original
> company's Bugzilla containing only the subset of products being sold.
> 
>   At the moment, the approach is to
>   1) Make a copy
>   2) Rename all the products that do NOT go with the new company to
> start with "BYE_"
>   3) Run a script full of mysql commands that systematically delete the
> rows of all the tables that are associated with those products' bugs'
> attachment's data, then products' bugs' attachments, then products'
> bugs' longesc, etc......
> 
>   I'm doing this for 2.22.*'s schema. 
>   I am wondering if this is something that should be made into a more
> general capability and kept up to date as the schema evolves.   If so, I
> would probably use a mechanism like "closed for bug entry" instead of
> renaming the products to indicate which ones should go away. Any thoughts?

We have something similar we've been using at Mozilla to produce
sanitized copies of the database that only include publicly-visible data
to give to researchers to avoid them having to pull xml versions of
every bug in the system to reconstruct it all.  Our version removes all
bugs that are in groups as well as insidergroup stuff and things in
hidden products.

It was originally a bunch of SQL but I ended up converting it to Perl so
I could point it at a copy of Bugzilla and let it use the built-in code
for deleting various things (which takes into account the foreign keys
and so forth).

It's on https://bugzilla.mozilla.org/show_bug.cgi?id=421025

-- 
Dave Miller                                   http://www.justdave.net/
System Administrator, Mozilla Corporation      http://www.mozilla.com/
Project Leader, Bugzilla Bug Tracking System  http://www.bugzilla.org/



More information about the developers mailing list