Contrib/ Bugzilla Stripping Tool

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Contrib/ Bugzilla Stripping Tool

Joel Peshkin
Hi All:

   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?

-Joel

-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>
Reply | Threaded
Open this post in threaded view
|

Re: Contrib/ Bugzilla Stripping Tool

Max Kanat-Alexander
On Tue, 08 Jul 2008 10:16:40 -0700 Joel Peshkin <[hidden email]>
wrote:
> Any thoughts?

        In 4.0 we'll have foreign keys, which will make that all a lot
easier. You should be able to just delete the product row and have
things go away--though some things you'd have to trace manually.
However, thanks to the FKs you should be able to do that by tracing
through the schema without ever having to update the script again in
the future.

        -Max
--
http://www.everythingsolved.com/
Competent, Friendly Bugzilla and Perl Services. Everything Else, too.
-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>
Reply | Threaded
Open this post in threaded view
|

Re: Contrib/ Bugzilla Stripping Tool

Dave Miller
In reply to this post by Joel Peshkin
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/
-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>
Reply | Threaded
Open this post in threaded view
|

Re: Contrib/ Bugzilla Stripping Tool

Frédéric Buclin
In reply to this post by Joel Peshkin
Joel Peshkin a écrit :
>   3) Run a script full of mysql commands

Why not simply deleting products from the UI? It knows what to do with
related data.

LpSolit

-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists@...>