Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id DFFFF63344C for ; Tue, 2 Mar 2010 14:15:32 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 16106-09 for ; Tue, 2 Mar 2010 18:15:22 +0000 (UTC) X-Greylist: delayed 00:05:24.195544 by SQLgrey-1.7.6 Received: from smtp172.iad.emailsrvr.com (smtp172.iad.emailsrvr.com [207.97.245.172]) by mail.postgresql.org (Postfix) with ESMTP id B08C9632505 for ; Tue, 2 Mar 2010 14:14:59 -0400 (AST) Received: from relay7.relay.iad.mlsrvr.com (localhost [127.0.0.1]) by relay7.relay.iad.mlsrvr.com (SMTP Server) with ESMTP id 832C21DE602; Tue, 2 Mar 2010 13:09:34 -0500 (EST) Received: by relay7.relay.iad.mlsrvr.com (Authenticated sender: chander-AT-otg-nc.com) with ESMTPSA id 498971DD892; Tue, 2 Mar 2010 13:09:34 -0500 (EST) Message-ID: <4B8D545D.80405@otg-nc.com> Date: Tue, 02 Mar 2010 13:09:33 -0500 From: Chander Ganesan User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: "Arnold, Sandra" CC: "pgsql-general@postgresql.org" , "pgsql-admin@postgresql.org" Subject: Re: The OS Command for pg_hotbackup -- Use lvmsnapshot instead of tar cvzf References: <54E5385D47A89542BC678F5426799F3904961EF60F@OSTIEX01.osti.gov> In-Reply-To: <54E5385D47A89542BC678F5426799F3904961EF60F@OSTIEX01.osti.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_50=0.001 X-Spam-Level: X-Archive-Number: 201003/17 X-Sequence-Number: 33816 Arnold, Sandra wrote: > I am currently using the pg_hotbackup Perl script to backup my > production PostgreSQL database. However, the next production database > is going to be close to a terrabyte in size. We feel that a tar cvzf > command is not the correct OS backup solution to use. Instead we > would like to use lvmsnapshot. Is anyone using the pg_hotbackup > script but instead of the tar cvzf OS command are they using lvmsnapshot? I believe that if you take an LVM snapshot and the change size exceeds the snapshot size (a configurable value) then the snapshot gets released, so you might want to be careful with this solution (I don't know how much data you accumulate, or how fast you accumulate it, or if that rate changes, etc.). You'll also need to ensure that you snapshot any and all tablespaces (if you use pg_start_backup() first the snapshots need not be simultaneous, but they still must be done). You might consider using rsync instead, it should be a lot faster than tar, and doesn't have the same downside as using snapshots. You'll also find that it is fairly widely used in the PostgreSQL community. -- Chander Ganesan Open Technology Group, Inc. One Copley Parkway, Suite 210 Morrisville, NC 27560 919-463-0999/877-258-8987 http://www.otg-nc.com Expert PostgreSQL, Python, PHP, and other open source training.