Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 00038650461 for ; Wed, 19 Nov 2008 12:28:19 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 00781-02-3 for ; Wed, 19 Nov 2008 12:28:13 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by mail.postgresql.org (Postfix) with ESMTP id BA9DE64FF86 for ; Wed, 19 Nov 2008 12:25:17 -0400 (AST) Received: by wa-out-1112.google.com with SMTP id j4so10761wah.19 for ; Wed, 19 Nov 2008 08:25:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=iWMU/vlltrSyeApkxXgXTPsklGKsabKJZOgjvIxyxXY=; b=fDHGTGWLn0OsqrnLecAUj4x7CKlKQ86hqYLRNmd4DtRFFaIl948che6dwuKakH6uGd 5JZQuEPn/0di4WvqT28xjX2mUwdF65/JXw8Lf9qzIr7BMpLyY26TiwqYwU6gjuXpRo9o oinGbcTy2eKx5WyOvygpDZYyFCHYh6otM4pik= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Ijgkxcsi4TRHL6YDwntCnY+Mtu+8nGmVOn1MPHkGcuGYgktpryENU4Oz2WO8Z9gOVL Gxt0TWkGGx3jsBOw4wIDv1USzK1t7srS47GrO508Lxcw8dDF04vqSZN7BKE2ARluOz5V aaq0lkE0iC4UQ1Unj7WUt77nMvUHz8ZnivgbQ= Received: by 10.114.181.1 with SMTP id d1mr734012waf.227.1227111915478; Wed, 19 Nov 2008 08:25:15 -0800 (PST) Received: by 10.114.133.14 with HTTP; Wed, 19 Nov 2008 08:25:15 -0800 (PST) Message-ID: Date: Wed, 19 Nov 2008 09:25:15 -0700 From: "Scott Marlowe" To: "=?ISO-8859-1?Q?Gerd_K=F6nig?=" Subject: Re: move from mysql to postgresql Cc: pgsql-admin@postgresql.org In-Reply-To: <492148D7.80207@transporeon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <492148D7.80207@transporeon.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200811/112 X-Sequence-Number: 30766 On Mon, Nov 17, 2008 at 3:35 AM, Gerd K=F6nig wrot= e: > Hello, > > we're going to switch from mysql (ver. 5.0.26) to PostgreSQL (OS: > opensuse 10.3). > The mysql database includes several instances, and we only want to > migrate the bugzilla instance to Postgres (yes, it's the bugzilla > backend...). > What are the preferred steps to perform this migration ? ("cost free" > solutions are highly appreciated ;-) ). The general method is to dump the schema and data separately, then hand mangle the schema as necessary to make it work in pgsql and then import the data, with whatever mangling needed there to fix the inevitably messed up data, like dates of 0000-00-00 which make no sense whatsoever. However, since bugzilla supports pgsql directly, I'd imagine you can use the bugzilla population scripts to create your schema in pgsql and then you only have to massage the data dump from mysql-bugzilla to make it work. If you are familiar with sed, it's awefull useful for fixing up broken data. Or you can toss together a script in one of the P or R languages (Perl, PHP, Python, Ruby et. al.) to fix it up. Usually it's pretty easy, but if you get stumped on some part post back with questions and somebody should jump on it.