Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YJo1u-0006Ap-Ac for pgsql-admin@arkaria.postgresql.org; Fri, 06 Feb 2015 18:53:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YJo1t-0005Q3-KU for pgsql-admin@arkaria.postgresql.org; Fri, 06 Feb 2015 18:53:25 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YJo1s-0005Pj-N6 for pgsql-admin@postgresql.org; Fri, 06 Feb 2015 18:53:24 +0000 Received: from mail-yk0-x229.google.com ([2607:f8b0:4002:c07::229]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YJo1p-0005P4-1T for pgsql-admin@postgresql.org; Fri, 06 Feb 2015 18:53:22 +0000 Received: by mail-yk0-f169.google.com with SMTP id 79so4034013ykr.0 for ; Fri, 06 Feb 2015 10:53:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=vbbv2XAFy3BQT9qWFCYCNsW5wIxFQWmTivz4CvPBBmc=; b=X2toHjpBjIbFBQ5vNOAGozfz5JNoraySkx++kvqljbeS3IY+KL3GY534ESXQNKbSG+ fd4OhL+x6CsIkPoZKjfHfsrcfSozMPBm3Qt5SuG1imlsZPsjCfnOtRPK4Thi/TkkZ19k zlhsnQj89s80E+ciWsG06yHq+kl2AmjZIv3WhCLc3UBJZvWFOFmgbozOGNJueyKerdg/ 2Lm2Y+8jayDQD9PhoveNYpkNU2gQ58FQo5hrMY+l86cR4pCw5nmAQIUpVAcsE6k8CE3F w/K18vX1Y57rfWS5whbzmDuLQOlGNBMCT3vn1RMk9JjPsPQ+U/lSj45SmrcDzM+Nvz7N oI8Q== X-Received: by 10.236.4.2 with SMTP id 2mr1741576yhi.71.1423248800172; Fri, 06 Feb 2015 10:53:20 -0800 (PST) Received: from [192.168.254.3] (h77.89.102.166.static.ip.windstream.net. [166.102.89.77]) by mx.google.com with ESMTPSA id e68sm2046012yhb.26.2015.02.06.10.53.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Feb 2015 10:53:19 -0800 (PST) Message-ID: <54D50D9B.1090905@gmail.com> Date: Fri, 06 Feb 2015 13:53:15 -0500 From: John Scalia User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "pgsql-admin@postgresql.org" Subject: Hourly backup using pg_basebackup Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hi all, We have a python script called by cron on an hourly basis to back up our production database. Currently, the script invokes pg_dump and takes more than hour to complete. Hence the script looks to see if it's already running and exits if so. I want to change the script so it uses pg_basebackup instead since that's so much faster. My problem is, however, that while I'd like to just have it build a tarball, maybe compressed, I can't use a "-X s" option for the wal segments. I think I understand why I can't use the streaming option with a "-Ft" specified. I'm just concerned about the docs saying that the backup may have problems with fetch as a wal segment may have expired. Manually testing is showing that the Db needs about 11 minutes to backup with pg_basebackup, and our wal_keep_segments setting is 6. This said, an hour's worth of wal segments should be available, but the six that were there at the beginning of the backup are not the same six there at the end. I don't think this is really a problem, but I'd like to get it confirmed. Wouldn't the backup actually have to take more than hour for this to be an issue? Thanks in advance, Jay -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin