Replicating a Bugzilla database structure

Gervase Markham <[email protected]> Mon, 6 Jul 2015 14:18:14 +0100
Newsgroups gmane.comp.bug-tracking.bugzilla.devel
Message-ID <[email protected]>
Let's say you want to make a copy of a Bugzilla database's structure -
i.e. all the data and configuration (products, components etc.), but not
the bugs or attachments. This is handy if you are setting up a test
system for a production server with a large databsae.

Try this (with appropriate auth credentials):

# Extract table structure but no data at all
mysqldump -u bugzilla -p --add-drop-database --add-drop-table --no-data
bugzilla > skeleton.db

# Extract table data of all tables except those relating to bugs and
attachments and other temporary stuff

mysqldump -u bugzilla -p --no-create-info
--ignore-table=bugzilla.attachments --ignore-table=bugzilla.attach_data
--ignore-table=bugzilla.bug_group_map
--ignore-table=bugzilla.bug_see_also --ignore-table=bugzilla.bug_tag
--ignore-table=bugzilla.bugs --ignore-table=bugzilla.bugs_activity
--ignore-table=bugzilla.bugs_fulltext --ignore-table=bugzilla.cc
--ignore-table=bugzilla.dependencies --ignore-table=bugzilla.duplicates
--ignore-table=bugzilla.flags --ignore-table=bugzilla.keywords
--ignore-table=bugzilla.longdescs --ignore-table=bugzilla.series_data
--ignore-table=bugzilla.votes --ignore-table=bugzilla.audit_log bugzilla
> data.db

Then send the two files you've created back to mysql, in the order you
created them.

Hope this helps someone. If you know a better way of doing this, do post it.

Gerv
_______________________________________________
dev-apps-bugzilla mailing list
dev-apps-bugzilla-CzyLcWPZiU5YsZ3hbOqMTti2O/[email protected]
https://lists.mozilla.org/listinfo/dev-apps-bugzilla
-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=gcbd-developers-Uylq5CNFT+jYtjvyW6yDsg@public.gmane.org>