Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSR2B-0005RY-Pi for pgsql-admin@arkaria.postgresql.org; Wed, 06 Nov 2019 19:32:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iSR29-0007HY-FS for pgsql-admin@arkaria.postgresql.org; Wed, 06 Nov 2019 19:32:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSR29-0007HM-2J for pgsql-admin@lists.postgresql.org; Wed, 06 Nov 2019 19:32:01 +0000 Received: from mout.perfora.net ([74.208.4.197]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iSR25-0002PJ-NA for pgsql-admin@postgresql.org; Wed, 06 Nov 2019 19:31:59 +0000 Received: from [192.168.1.101] ([98.169.208.73]) by mrelay.perfora.net (mreueus001 [74.208.5.2]) with ESMTPSA (Nemesis) id 0LnidV-1i0DQR2HUd-00hwpj; Wed, 06 Nov 2019 20:31:48 +0100 Subject: Re: RE : PostgreSQL logical incremental backup for version 9.6 and above To: girish R G peetle Cc: PASCAL CROZET , pgsql-admin References: <81433983e7fb485ba294ddad7854f41d@qualis-consulting.com> From: MichaelDBA Message-ID: <6ae6b225-44f5-1b19-0d82-5fc1d41b9433@sqlexec.com> Date: Wed, 6 Nov 2019 14:31:45 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.8 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------E53A5F0115B57681D0098482" Content-Language: en-US X-Provags-ID: V03:K1:fMJEZZGD/ROd1o9qA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Led00DZ05f9gxwOo8wJW70X9nDCiVFGVQFZy6chI9+QNCZ6985BBRsTKWh2IneeauzlfkPFq r9wCSp8S+4dxmJ3wheS11/DFKN+uDCf9EfLctuWlQ= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------E53A5F0115B57681D0098482 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi, You can use pgbackrest to store WAL on AWS S3, but you need a binary backup from which to apply WAL to do PITR. pg_dump is not a binary backup.  AWS RDS does not allow access to the underlying file system. So you cannot use pgbackrest to do backup or restore, or use the WAL you saved, let's say on S3, to do PITR. Regards, Michael Vitale girish R G peetle wrote on 11/6/2019 2:26 PM: > Hi Pascal, > Thanks for the suggestion. Looks like pgBackRest relies on WAL archive > logs. But for Amazon RDS or Azure Database WAL logs are not > accessible. We can only do pg_dump and logical replication. > So pgBackRest won't work for my case. > > Thanks > Girish > > On Wed, Nov 6, 2019 at 2:05 PM PASCAL CROZET > > wrote: > > Hi, > > I think you can user pgBackRest > > *_________________________________* > > Cordialement, *Pascal CROZET* > > *DBA - *Qualis Consulting > > > •www.qualis-consulting.com •04 > 78 22 74 90 > •Le Bois des Côtes 1 – Bâtiment A > •300 Route Nationale 6 – 69760 LIMONEST > *_________________________________* > > *De : *girish R G peetle > *Envoyé le :*mercredi 6 novembre 2019 18:03 > *À : *pgsql-admin > *Objet :*PostgreSQL logical incremental backup for version 9.6 and > above > > Hi, > I've a requirement to backup incremental data from PostgreSQL > database server which are hosted as 'database as a service' like > 'Amazon RDS' , Azure Database etc. > > Full dump can be taken using pg_dump. But is there is a way to > capture incremental changes to the database ?  I read about > logical replication slots which can be created for each database > to capture incremental changes. > But how do we know from where we should backup the SQL statements > (as we need need skip those statements already backed up by pg_dump). > > I thinking of following steps. > Step 1: Create logical replication slot > Step 2: Run pg_dump ( for full load ). > Step 3: Capture the changes since last pg_dump using replication > slot - How to know this information ? > > Thanks in advance for any advise. > > Thanks > Girish > --------------E53A5F0115B57681D0098482 Content-Type: multipart/related; boundary="------------7AF12BDAD119D70480E39F93" --------------7AF12BDAD119D70480E39F93 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Hi,
You can use pgbackrest to store WAL on AWS S3, but you need a binary backup from which to apply WAL to do PITR. pg_dump is not a binary backup.  AWS RDS does not allow access to the underlying file system.  So you cannot use pgbackrest to do backup or restore, or use the WAL you saved, let's say on S3, to do PITR.

Regards,
Michael Vitale

girish R G peetle wrote on 11/6/2019 2:26 PM:
Hi Pascal, 
Thanks for the suggestion. Looks like pgBackRest relies on WAL archive logs. But for Amazon RDS or Azure Database WAL logs are not accessible. We can only do pg_dump and logical replication. 
So pgBackRest won't work for my case. 

Thanks
Girish

On Wed, Nov 6, 2019 at 2:05 PM PASCAL CROZET <pascal.crozet@qualis-consulting.com> wrote:

Hi,

 

I think you can user pgBackRest

 

_________________________________

Cordialement, Pascal CROZET

DBA - Qualis Consulting

• www.qualis-consulting.com • 04 78 22 74 90
• Le Bois des Côtes 1 – Bâtiment A
• 300 Route Nationale 6 – 69760 LIMONEST
_________________________________

 

De : girish R G peetle
Envoyé le :mercredi 6 novembre 2019 18:03
À : pgsql-admin
Objet :PostgreSQL logical incremental backup for version 9.6 and above

 

Hi, 
I've a requirement to backup incremental data from PostgreSQL database server which are hosted as 'database as a service' like 'Amazon RDS' , Azure Database etc. 

Full dump can be taken using pg_dump. But is there is a way to capture incremental changes to the database ?  I read about logical replication slots which can be created for each database to capture incremental changes. 
But how do we know from where we should backup the SQL statements (as we need need skip those statements already backed up by pg_dump). 

I thinking of following steps. 
Step 1: Create logical replication slot
Step 2: Run pg_dump ( for full load ). 
Step 3: Capture the changes since last pg_dump using replication slot - How to know this information ?

Thanks in advance for any advise. 

Thanks
Girish

--------------7AF12BDAD119D70480E39F93 Content-Type: image/png; name="image.png" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: inline; filename="image.png" iVBORw0KGgoAAAANSUhEUgAAAIsAAAAlCAYAAAByDxphAAAAKklEQVR4nO3BAQ0AAADCoPdP bQ8HFAAAAAAAAAAAAAAAAAAAAAAAAABwb1CBAAEmUMyPAAAAAElFTkSuQmCC --------------7AF12BDAD119D70480E39F93-- --------------E53A5F0115B57681D0098482--