Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id B4E20634E9D for ; Tue, 8 Jun 2010 02:29:33 -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 62890-05 for ; Tue, 8 Jun 2010 05:29:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from rs47.luxsci.com (rs47.luxsci.com [65.61.166.88]) by mail.postgresql.org (Postfix) with ESMTP id 4DD70633487 for ; Tue, 8 Jun 2010 02:29:26 -0300 (ADT) Received: from gnanam (ABTS-TN-Static-186.58.165.122.airtelbroadband.in [122.165.58.186] (may be forged)) (authenticated bits=0) by rs47.luxsci.com (8.13.1/8.13.7) with ESMTP id o585TCoq026547; Tue, 8 Jun 2010 00:29:19 -0500 Reply-To: From: "Gnanakumar" To: "'Samuel Stearns'" Cc: References: <001201cb0321$df429d40$9dc7d7c0$@com> <00ca01cb03dc$a9ffe780$fdffb680$@com> <00cc01cb047d$82079830$8616c890$@com> <7B83DD06-04B8-4BE5-8573-3CDD48568F1D@phlo.org> <68B59BEDCD36854AADBDF17E91B2937A01A5937796@EXCHMAIL.staff.internode.com.au> In-Reply-To: <68B59BEDCD36854AADBDF17E91B2937A01A5937796@EXCHMAIL.staff.internode.com.au> Subject: Re: PITR Recovery Question Date: Tue, 8 Jun 2010 10:59:17 +0530 Organization: Zoniac Software Private Limited Message-ID: <000201cb06cb$8b068860$a1139920$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcsFdaca3hbFW2CVRFC5TimlTUHTUQAWVdawAD8SMWA= Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.1 tagged_above=-10 required=5 tests=BAYES_50=0.8, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201006/69 X-Sequence-Number: 34847 Hi Sam, Thank your sharing this script. > Here's a script to make your backup and rsync it to a remote destination: > #!/bin/bash > echo "checkpoint" > echo "CHECKPOINT;" | /local/pkg/bin/psql template1 > echo "start backup" > echo "SELECT pg_start_backup('cisoradr:/cis/pgsql/katana7/backup');" | /local/pkg/bin/psql template1 > echo "rsync" > /local/pkg/bin/rsync --delete -azxH /local/app/postgres/data pgsql@cisoradr-ext:/cis/pgsql/katana7/backup/. > echo "Stop backup" > echo "SELECT pg_stop_backup();" | /local/pkg/bin/psql template1