From just1coder@yahoo.ca Thu Jul 22 13:46:49 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 86F3D633296 for ; Thu, 22 Jul 2010 10:46:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 72210-07 for ; Thu, 22 Jul 2010 13:46:42 +0000 (UTC) X-Greylist: delayed 00:05:35.771033 by SQLgrey-1.7.6 Received: from n13.bullet.mail.ac4.yahoo.com (n13.bullet.mail.ac4.yahoo.com [74.6.228.93]) by mail.postgresql.org (Postfix) with SMTP id 4CDE26327CC for ; Thu, 22 Jul 2010 10:46:42 -0300 (ADT) Received: from [76.13.12.67] by n13.bullet.mail.ac4.yahoo.com with NNFMP; 22 Jul 2010 13:41:04 -0000 Received: from [76.13.10.169] by t8.bullet.mail.ac4.yahoo.com with NNFMP; 22 Jul 2010 13:41:04 -0000 Received: from [127.0.0.1] by omp110.mail.ac4.yahoo.com with NNFMP; 22 Jul 2010 13:41:04 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 560108.15383.bm@omp110.mail.ac4.yahoo.com Received: (qmail 57659 invoked by uid 60001); 22 Jul 2010 13:41:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1279806064; bh=MKjBVmYzRSPBrpAVl/pHhQnOOJFyFyoWdmhMDuOKs8w=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=MVK0yY6bm9XCuhY9eEJaBPOZ1iMSunyM8mMVPvxW79ABZnNdzurx6frYDdUr/HcotEGZqtM1IYj9WwVGXHFPvyY+sRxpsMvOg9AjsEkX9+pL/t/du0B/pXFEhHIYCd9T92oks8FxXHCEt3JWOZUigcQRXNoHbfgjlPxGJnYw1pk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=nNXq6xfOeMm88wWJ3qVKH0E1Pvqk2TnDIN/fWdm4xnpTDnhzVI0WVQt1ONJE+Yn4aOkaSFC6fsPJFK3UyAD4EIutPdqYnFvWbEXK4fy2oo8vKOJ0RYxRpHRjjr4TimglFTQKmDlH3nJvSfYLjMbjnTc4+jbTsIz7VMAZVIy98ck=; Message-ID: <263251.56844.qm@web65412.mail.ac4.yahoo.com> X-YMail-OSG: L3IA1K4VM1n3J212X9dJNuHYZlL9EbXM7_9gUMkDqP0jOrg jnYo3m1Kd9jCjyv.gUl5kORfkk_HlavkG5VbP0Qkp7R7T4mj5jQ2BxsUiMdu DAqf0KyWl1NUddgYqu569Y0dztfbIDbfW27wqQdtABorRYG8w.TeeIVt61Qp M4ZjiwRT6S3aphuCGdqZfqWSdtWYcBeitPP8RbwmArj3dsnbBCf5OsJbzDHC _ovXI4s_o8sc_y9LvImF0CzZOEETGYhkvWRGZt9JlTyAeU6d7hU.YCiY8wGv PBOdFiH5PzELEz5UEu21seTVX8qfQ4Tm3LBrUsPYlN5fq_JITXLW9Mw-- Received: from [66.207.110.134] by web65412.mail.ac4.yahoo.com via HTTP; Thu, 22 Jul 2010 06:41:03 PDT X-Mailer: YahooMailRC/420.4 YahooMailWebService/0.8.105.277674 Date: Thu, 22 Jul 2010 06:41:03 -0700 (PDT) From: a f Subject: Restore a backup to a different disk? To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1251876282-1279806063=:56844" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.801 tagged_above=-10 required=5 tests=BAYES_50=0.8, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201007/154 X-Sequence-Number: 35173 --0-1251876282-1279806063=:56844 Content-Type: text/plain; charset=us-ascii Good day all, I am fairly new with PQSQL and am slowly picking things up - I have added a new disk and would like to do two things: 1. Restore a backup to this new disk - /hda2/pgdata/ 2. Move a database from /hda1/pgdata to /hda2/pgdata/ Any help is most appreciated, thank you. --0-1251876282-1279806063=:56844 Content-Type: text/html; charset=us-ascii
Good day all, 

I am fairly new with PQSQL and am slowly picking things up - I have added a new disk and would like to do two things:

1. Restore a backup to this new disk - /hda2/pgdata/
2. Move a database from /hda1/pgdata to /hda2/pgdata/

Any help is most appreciated, thank you.

--0-1251876282-1279806063=:56844-- From Kevin.Grittner@wicourts.gov Thu Jul 22 16:53:14 2010 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id ECD90632AC1 for ; Thu, 22 Jul 2010 13:53:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 14541-07 for ; Thu, 22 Jul 2010 16:53:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 0C3BA63250C for ; Thu, 22 Jul 2010 13:53:04 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 22 Jul 2010 11:53:01 -0500 Message-Id: <4C48311B0200002500033B27@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 22 Jul 2010 11:52:59 -0500 From: "Kevin Grittner" To: ,"a f" Subject: Re: Restore a backup to a different disk? References: <263251.56844.qm@web65412.mail.ac4.yahoo.com> In-Reply-To: <263251.56844.qm@web65412.mail.ac4.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/155 X-Sequence-Number: 35174 a f wrote: > I have added a new disk and would like to do two things: > > 1. Restore a backup to this new disk - /hda2/pgdata/ > 2. Move a database from /hda1/pgdata to /hda2/pgdata/ First I want to be clear about whether you want to restore and move entire database *clusters*, or whether you want to deal with individual databases within a cluster. A cluster is the level at which you start and stop the server process, and it can contain many databases -Kevin From just1coder@yahoo.ca Thu Jul 22 17:17:13 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B83D56345AB for ; Thu, 22 Jul 2010 14:17:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 38400-08 for ; Thu, 22 Jul 2010 17:17:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from n11.bullet.mail.ac4.yahoo.com (n11.bullet.mail.ac4.yahoo.com [74.6.228.83]) by mail.postgresql.org (Postfix) with SMTP id 710196343DF for ; Thu, 22 Jul 2010 14:17:04 -0300 (ADT) Received: from [76.13.12.66] by n11.bullet.mail.ac4.yahoo.com with NNFMP; 22 Jul 2010 17:17:03 -0000 Received: from [76.13.10.179] by t7.bullet.mail.ac4.yahoo.com with NNFMP; 22 Jul 2010 17:17:03 -0000 Received: from [127.0.0.1] by omp120.mail.ac4.yahoo.com with NNFMP; 22 Jul 2010 17:17:03 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 418032.32300.bm@omp120.mail.ac4.yahoo.com Received: (qmail 87350 invoked by uid 60001); 22 Jul 2010 17:17:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1279819023; bh=KZzoESPfLRzc8I6deMHnyed1XGDOMIpwatrbtDAfdis=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=cjla377u+j16XWeqoGfIfllEvKUneV3qbFR4XLpGth6ikr5/OHRK5a/CTUuoRsqck/cLNXQUj0lHw8oOOtk/oOTWECqRc1ovbcJPcM89KG6bxkzPPtj64fgCSYy95LHGe9Se9PPmiXhYi5hK2gBiymK3r/lRdoEJ8HhhIlvO1Jo= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=3WC2TMmh7/dUh953mQW5OZ+YBvqMiSh6wlxHVPR3J3B2lbD4bzJ2UIlTDCIku2rCs52zlt+ObaR1Z9XuvJT4YT/s2ki88QEPIFpCu/4iHkfwWicFxDq1In+AAuihXZiKstnoU9S7OR46aWfEVYdx7WXhS3f5xvbH7QTuPI4ErKI=; Message-ID: <240044.87213.qm@web65408.mail.ac4.yahoo.com> X-YMail-OSG: BUERRhkVM1mdrU.U71mubUR8lXYe0r9mC.Yujl82g3VvZeX 1WT6TcpsOr26G49LuytW4O2n205dJ0fnGgwsEOVwg4gFCXFo_J07s4Y71BKL y5je35jiZxKxu0lvq9CUWczy4dtCQuE662yw0vMpKzGhnv..9bXQojnycp8D xYIdHkjg98ECRB3Sy.xd8o7EU0tLVjYx9aMyNBRCUlTeA4yG5zdBuWa0EJeb hr1ZvdIuVbeb8ecKQyBYQ3nqb3gUoQXOLWZyiEfwJPKmBHNiqIEXc7qs6MbO C8JoYh5OiHeZyhIWGNbCKIKrQSRuNgFkVKq6V2vu3QawbhLwASq2Oixxy5U. XYnn4QCTmziDJISNQMQ-- Received: from [66.207.110.134] by web65408.mail.ac4.yahoo.com via HTTP; Thu, 22 Jul 2010 10:17:02 PDT X-Mailer: YahooMailRC/420.4 YahooMailWebService/0.8.105.277674 References: <263251.56844.qm@web65412.mail.ac4.yahoo.com> <4C48311B0200002500033B27@gw.wicourts.gov> Date: Thu, 22 Jul 2010 10:17:02 -0700 (PDT) From: a f Subject: Re: Restore a backup to a different disk? To: Kevin Grittner , pgsql-admin@postgresql.org In-Reply-To: <4C48311B0200002500033B27@gw.wicourts.gov> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1931044126-1279819022=:87213" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201007/156 X-Sequence-Number: 35175 --0-1931044126-1279819022=:87213 Content-Type: text/plain; charset=us-ascii No cluster here, it is just a stand alone db server. Sorry if I sent this to the wrong UG. I have #2 down already; but #1 was focused on backing up MyDatabase that resides on /hda1/pgdata, and restore it as MyDatabase2 on /hda2/pgdata. ________________________________ From: Kevin Grittner To: pgsql-admin@postgresql.org; a f Sent: Thu, July 22, 2010 12:52:59 PM Subject: Re: [ADMIN] Restore a backup to a different disk? a f wrote: > I have added a new disk and would like to do two things: > > 1. Restore a backup to this new disk - /hda2/pgdata/ > 2. Move a database from /hda1/pgdata to /hda2/pgdata/ First I want to be clear about whether you want to restore and move entire database *clusters*, or whether you want to deal with individual databases within a cluster. A cluster is the level at which you start and stop the server process, and it can contain many databases -Kevin -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin --0-1931044126-1279819022=:87213 Content-Type: text/html; charset=us-ascii
No cluster here, it is just a stand alone db server. Sorry if I sent this to the wrong UG.

I have #2 down already; but #1 was focused on backing up MyDatabase that resides on /hda1/pgdata, and restore it as MyDatabase2 on /hda2/pgdata.


From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pgsql-admin@postgresql.org; a f <just1coder@yahoo.ca>
Sent: Thu, July 22, 2010 12:52:59 PM
Subject: Re: [ADMIN] Restore a backup to a different disk?

a f <just1coder@yahoo.ca> wrote:

> I have added a new disk and would like to do two things:
>
> 1. Restore a backup to this new disk - /hda2/pgdata/
> 2. Move a database from /hda1/pgdata to /hda2/pgdata/

First I want to be clear about whether you want to restore and move
entire database *clusters*, or whether you want to deal with
individual databases within a cluster.  A cluster is the level at
which you start and stop the server process, and it can contain many
databases

-Kevin

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

--0-1931044126-1279819022=:87213-- From Kevin.Grittner@wicourts.gov Thu Jul 22 19:05:18 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 44903641491 for ; Thu, 22 Jul 2010 16:05:18 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 91439-01-7 for ; Thu, 22 Jul 2010 19:05:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id A932C64364C for ; Thu, 22 Jul 2010 15:59:03 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 22 Jul 2010 13:59:02 -0500 Message-Id: <4C484E9E0200002500033B56@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 22 Jul 2010 13:58:54 -0500 From: "Kevin Grittner" To: ,"a f" Subject: Re: Restore a backup to a different disk? References: <263251.56844.qm@web65412.mail.ac4.yahoo.com> <4C48311B0200002500033B27@gw.wicourts.gov> <240044.87213.qm@web65408.mail.ac4.yahoo.com> In-Reply-To: <240044.87213.qm@web65408.mail.ac4.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/157 X-Sequence-Number: 35176 a f wrote: > No cluster here, it is just a stand alone db server. There's some terminology you've apparently not grasped yet -- when PostgreSQL is running, the instance of the server is referred to as a "cluster". If you're running a PostgreSQL database server, you are running a cluster, in the terminology of the PostgreSQL world. Within the cluster you normally have a template0 database, a template1 database, a postgres database, and one or more application databases. > Sorry if I sent this to the wrong UG. Posting to this list is fine for this question. pgsql-general or pgsql-novice would also be OK, but having posted here, don't post on another list unless the thread here goes dormant for at least a couple days. http://wiki.postgresql.org/wiki/Guide_to_reporting_problems > I have #2 down already; So you moved a PostgreSQL cluster from one mount point to another? How, exactly, did you do that? > but #1 was focused on backing up MyDatabase that resides on > /hda1/pgdata, and restore it as MyDatabase2 on /hda2/pgdata. Do you already have the backup you want to restore? If so, how was it made, exactly? -Kevin From just1coder@yahoo.ca Thu Jul 22 19:18:09 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 4DCBC6322E8 for ; Thu, 22 Jul 2010 16:18:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 96790-01 for ; Thu, 22 Jul 2010 19:18:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from n11.bullet.mail.ac4.yahoo.com (n11.bullet.mail.ac4.yahoo.com [74.6.228.83]) by mail.postgresql.org (Postfix) with SMTP id C896A632BE7 for ; Thu, 22 Jul 2010 16:18:01 -0300 (ADT) Received: from [76.13.12.65] by n11.bullet.mail.ac4.yahoo.com with NNFMP; 22 Jul 2010 19:18:00 -0000 Received: from [76.13.10.172] by t6.bullet.mail.ac4.yahoo.com with NNFMP; 22 Jul 2010 19:18:00 -0000 Received: from [127.0.0.1] by omp113.mail.ac4.yahoo.com with NNFMP; 22 Jul 2010 19:18:00 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 476364.96048.bm@omp113.mail.ac4.yahoo.com Received: (qmail 75497 invoked by uid 60001); 22 Jul 2010 19:18:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1279826280; bh=IojgtfekxaPkVPk7jSARZqhczf52WxaDQ2BbqqxlC3o=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=EuF7HVRYXCa5GRk76SrKRAhcky2qgN7EzbBvr4ijCiS9b8uGlOrDFS32s83pWv5HznEPEGuv5DL69SfeVfg7vehv8McsJJpQgOZBkuJiTYyYd4x/Z8ALo0KmHEjVAahaHyEDDn2oh9YKDP/ppdnXF0dadCArBPqP7BgKJf66mi4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=kig8aDFfRS4ciR7Q1Q9Z6uYLknMixsm8oytZ154FBaLV+ICV4B93HlkCdrpzBIeicR85pSaXn8SP7IWTbugBnM6yfS0YkcKnr/GHB3k+wJk8rCfcr1Tf64Y/pHLDwNtIE90LUrkf3t5HXee1nx2CGSuGKj38z5Bf3cyEt+xrRnM=; Message-ID: <248984.75183.qm@web65402.mail.ac4.yahoo.com> X-YMail-OSG: MSNhzdQVM1l.nkJXWFG8q0pkLIScWgX3tzcHd8N4vC7RegE tRc9yMx7XgGa7oJCt1sesAD6AM66636.hVAFzmaRC1rPWLbDF6wUUOKQSB4e 2jLyWRt.D2MaryWyiVCh_BqSv05CEIq6bCj8VvUN_9nJWCtF0_ArYyEl.Ca7 .01ax9Ne0E6gS.OoeQQGjSYs44XONWnaG.Fi4mYf7wBMMoJWRvaIRK0tramW IRPBX3nPAel9Fj548JlrJCl.8JcPbsTIL3EyC5rxxdH8DZajZpTocXgYltKT aOaYJ6wx9uezov0VNNEgG7f4P9U2_gt6VQFsDL1k- Received: from [66.207.110.134] by web65402.mail.ac4.yahoo.com via HTTP; Thu, 22 Jul 2010 12:18:00 PDT X-Mailer: YahooMailRC/420.4 YahooMailWebService/0.8.105.277674 References: <263251.56844.qm@web65412.mail.ac4.yahoo.com> <4C48311B0200002500033B27@gw.wicourts.gov> <240044.87213.qm@web65408.mail.ac4.yahoo.com> <4C484E9E0200002500033B56@gw.wicourts.gov> Date: Thu, 22 Jul 2010 12:18:00 -0700 (PDT) From: a f Subject: Re: Restore a backup to a different disk? To: Kevin Grittner , pgsql-admin@postgresql.org In-Reply-To: <4C484E9E0200002500033B56@gw.wicourts.gov> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1140954889-1279826280=:75183" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.782 tagged_above=-10 required=5 tests=BAYES_50=0.8, HTML_FONT_FACE_BAD=0.981, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: * X-Archive-Number: 201007/158 X-Sequence-Number: 35177 --0-1140954889-1279826280=:75183 Content-Type: text/plain; charset=us-ascii >> but #1 was focused on backing up MyDatabase that resides on >> /hda1/pgdata, and restore it as MyDatabase2 on /hda2/pgdata. >Do you already have the backup you want to restore? If so, how was >it made, exactly? Yes. I used pg_dump to make the backup. --0-1140954889-1279826280=:75183 Content-Type: text/html; charset=us-ascii


>> but #1 was focused on backing up MyDatabase that resides on
>> /hda1/pgdata, and restore it as MyDatabase2 on /hda2/pgdata.

>Do you already have the backup you want to restore?  If so, how was
>it made, exactly?

Yes. 
I used pg_dump to make the backup.

--0-1140954889-1279826280=:75183-- From Kevin.Grittner@wicourts.gov Thu Jul 22 20:48:51 2010 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 48DAE635BE7 for ; Thu, 22 Jul 2010 17:48:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 86048-01 for ; Thu, 22 Jul 2010 20:48:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 22F3B635682 for ; Thu, 22 Jul 2010 17:48:43 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 22 Jul 2010 15:48:42 -0500 Message-Id: <4C4868510200002500033B87@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 22 Jul 2010 15:48:33 -0500 From: "Kevin Grittner" To: ,"a f" Subject: Re: Restore a backup to a different disk? References: <263251.56844.qm@web65412.mail.ac4.yahoo.com> <4C48311B0200002500033B27@gw.wicourts.gov> <240044.87213.qm@web65408.mail.ac4.yahoo.com> <4C484E9E0200002500033B56@gw.wicourts.gov> <248984.75183.qm@web65402.mail.ac4.yahoo.com> In-Reply-To: <248984.75183.qm@web65402.mail.ac4.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.81 tagged_above=-10 required=5 tests=BAYES_05=-0.5, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/160 X-Sequence-Number: 35179 a f wrote: >>> but #1 was focused on backing up MyDatabase that resides on >>> /hda1/pgdata, and restore it as MyDatabase2 on /hda2/pgdata. > >> Do you already have the backup you want to restore? If so, how >> was it made, exactly? > > > Yes. > I used pg_dump to make the backup. Well, if you made it without specifying any non-default options you're not telling me about, you should initdb on the new drive (if you haven't already), create any roles you had in the old database which you want in the new one, create the database with the name you want it to have, and run psql against that database using the file created by pg_dump. -Kevin From mailinglist@longimanus.net Fri Jul 23 07:15:45 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id CF7A3632AEE for ; Fri, 23 Jul 2010 04:15:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 66823-02 for ; Fri, 23 Jul 2010 07:15:38 +0000 (UTC) X-Greylist: delayed 00:59:25.906199 by SQLgrey-1.7.6 Received: from echo917.server4you.de (echo917.server4you.de [85.25.141.73]) by mail.postgresql.org (Postfix) with ESMTP id 110E66324A4 for ; Fri, 23 Jul 2010 04:15:37 -0300 (ADT) Received: from localhost.localdomain (essn-d9bba244.pool.mediaWays.net [217.187.162.68]) (authenticated bits=0) by echo917.server4you.de (8.14.2/8.13.6) with ESMTP id o6N6G3tt001955; Fri, 23 Jul 2010 08:16:08 +0200 Message-ID: <4C4933A3.20909@longimanus.net> Date: Fri, 23 Jul 2010 08:16:03 +0200 From: Andreas Schmitz User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5 MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-admin@postgresql.org, a f Subject: Re: Restore a backup to a different disk? References: <263251.56844.qm@web65412.mail.ac4.yahoo.com> <4C48311B0200002500033B27@gw.wicourts.gov> <240044.87213.qm@web65408.mail.ac4.yahoo.com> <4C484E9E0200002500033B56@gw.wicourts.gov> <248984.75183.qm@web65402.mail.ac4.yahoo.com> <4C4868510200002500033B87@gw.wicourts.gov> In-Reply-To: <4C4868510200002500033B87@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-10 required=5 tests=BAYES_40=-0.001 X-Spam-Level: X-Archive-Number: 201007/166 X-Sequence-Number: 35185 Reading this thread confuses me a little bit. There is no need to backup a cluster in order to move it to another disk within the same machine. Stopping the Database, moving $PGDATA, adjusting scripts and routines if nessecary and firing up the whole thing would do fine. regards -Andreas On 07/22/2010 10:48 PM, Kevin Grittner wrote: > a f wrote: > > >>>> but #1 was focused on backing up MyDatabase that resides on >>>> /hda1/pgdata, and restore it as MyDatabase2 on /hda2/pgdata. >>>> >> >>> Do you already have the backup you want to restore? If so, how >>> was it made, exactly? >>> >> >> Yes. >> I used pg_dump to make the backup. >> > > Well, if you made it without specifying any non-default options > you're not telling me about, you should initdb on the new drive (if > you haven't already), create any roles you had in the old database > which you want in the new one, create the database with the name you > want it to have, and run psql against that database using the file > created by pg_dump. > > -Kevin > >