X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CD4A2569C5; Thu, 17 Mar 2005 05:03:15 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80565-02; Thu, 17 Mar 2005 05:03:03 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [64.139.89.126]) by svr1.postgresql.org (Postfix) with ESMTP id 1F2C9569BD; Thu, 17 Mar 2005 05:03:02 +0000 (GMT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id j2H52ta00621; Thu, 17 Mar 2005 00:02:55 -0500 (EST) From: Bruce Momjian Message-Id: <200503170502.j2H52ta00621@candle.pha.pa.us> Subject: Re: Fast major-version upgrade (was: [GENERAL] postgresql 8.0 In-Reply-To: <20050228193658.GC533@decibel.org> To: "Jim C. Nasby" Date: Thu, 17 Mar 2005 00:02:55 -0500 (EST) Cc: Tino Wildenhain , Jeff Davis , schen@graciousstyle.com, PgSQL General List , pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM1111035775-20022-8_ Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.011 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/12 X-Sequence-Number: 2908 --ELM1111035775-20022-8_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Jim C. Nasby wrote: > > > Has anyone tried moving a database from one location to another on the > > > HD? I'd like to use slony to minimize downtime, but I'd also like my > > > data to end up in the same place it is right now when I'm done. > > > > I used a straight copy of the filesystem with running database > > (over the net in my case) and immediately after that, > > stop the db and rsync for the last changes. This took only > > 10 minutes (compared to 1.5h for the full filesystem copy) > > and I could start up the db in new location. > > > > this could work for you too. > > I hadn't thought about using rsync; that's a great idea! > > Is there somewhere this could be documented? In an FAQ maybe? Added to documentation, patch attached. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 --ELM1111035775-20022-8_ Content-Transfer-Encoding: 7bit Content-Type: text/plain Content-Disposition: inline; filename="/bjm/diff" Index: doc/src/sgml/backup.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v retrieving revision 2.56 diff -c -c -r2.56 backup.sgml *** doc/src/sgml/backup.sgml 25 Feb 2005 04:56:01 -0000 2.56 --- doc/src/sgml/backup.sgml 17 Mar 2005 05:01:54 -0000 *************** *** 374,379 **** --- 374,388 ---- + Another option is to use rsync to perform a file + system backup. First, while the database server is running, + run rsync, then shut down the database + server and perform a second rsync, then + restart the database server. This allows a file system backup to be + performed with minimal downtime. + + + Note that a file system backup will not necessarily be smaller than an SQL dump. On the contrary, it will most likely be larger. (pg_dump does not need to dump --ELM1111035775-20022-8_--