From 124a980a03ec47266f2a5642a333870e55284430 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 30 Dec 2006 07:17:53 +0000 Subject: Bug 364637: contrib/bzdbcopy.pl: Can't locate object method "params" via package "Bugzilla" at Bugzilla/DB/Mysql.pm line 65 Patch By Max Kanat-Alexander r=LpSolit, a=justdave --- contrib/bzdbcopy.pl | 72 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 24 deletions(-) (limited to 'contrib/bzdbcopy.pl') diff --git a/contrib/bzdbcopy.pl b/contrib/bzdbcopy.pl index ac3ba8248..ebfe3e45b 100755 --- a/contrib/bzdbcopy.pl +++ b/contrib/bzdbcopy.pl @@ -1,36 +1,26 @@ #!/usr/bin/perl -w # -# bzdbcopy.pl - Copies data from one Bugzilla database to another. +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ # -# Author: Max Kanat-Alexander +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. # -# The intended use of this script is to copy data from an installation -# running on one DB platform to an installation running on another -# DB platform. +# The Original Code is the Bugzilla Bug Tracking System. # -# It must be run from the directory containing your Bugzilla installation. -# That means if this script is in the contrib/ directory, you should -# be running it as: ./contrib/bzdbcopy.pl -# -# Note: Both schemas must already exist and be IDENTICAL. (That is, -# they must have both been created/updated by the same version of -# checksetup.pl.) This script will DESTROY ALL CURRENT DATA in the -# target database. -# -# Both Schemas must be at least from Bugzilla 2.19.3, but if you're -# running a Bugzilla from before 2.20rc2, you'll need the patch at: -# https://bugzilla.mozilla.org/show_bug.cgi?id=300311 in order to -# be able to run this script. -# -# Before you using it, you have to correctly set all the variables -# in the "User-Configurable Settings" section, below. The "SOURCE" -# settings are for the database you're copying from, and the "TARGET" -# settings are for the database you're copying to. The DB_TYPE is -# the name of a DB driver from the Bugzilla/DB/ directory. +# The Initial Developer of the Original Code is Everything Solved. +# Portions created by Everything Solved are Copyright (C) 2006 +# Everything Solved. All Rights Reserved. # +# Contributor(s): Max Kanat-Alexander use strict; use lib "."; +use Bugzilla; use Bugzilla::DB; use Bugzilla::Util; @@ -178,4 +168,38 @@ $target_db->commit; print "All done! Make sure to run checksetup on the new DB.\n"; $source_db->disconnect; $target_db->disconnect; + 1; + +__END__ + +=head1 NAME + +bzdbcopy.pl - Copies data from one Bugzilla database to another. + +=head1 DESCRIPTION + +The intended use of this script is to copy data from an installation +running on one DB platform to an installation running on another +DB platform. + +It must be run from the directory containing your Bugzilla installation. +That means if this script is in the contrib/ directory, you should +be running it as: C<./contrib/bzdbcopy.pl> + +Note: Both schemas must already exist and be B. (That is, +they must have both been created/updated by the same version of +checksetup.pl.) This script will B in the +target database. + +Both Schemas must be at least from Bugzilla 2.19.3, but if you're +running a Bugzilla from before 2.20rc2, you'll need the patch at: +L in order to +be able to run this script. + +Before you using it, you have to correctly set all the variables +in the "User-Configurable Settings" section at the top of the script. +The C settings are for the database you're copying from, and +the C settings are for the database you're copying to. The +C is the name of a DB driver from the F directory. + -- cgit v1.2.3-24-g4f1b