Need help pg backup & recovery

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Need help pg backup & recovery

Srikar Vankadaru

Hello Folks,

 

Need help in PG backup & PIT recovery. We have setup PG server with following filesystem layout:

 

PG Revision – 11.2

Filesystem Layout:

 

Data - /pgdata

Tablespaces - /pgtablespaces

Indexes - /pgindexes

 

Now I setup up full backup using pgdump and WAL logs (for PITR).

During the recovery will the pgdump recovers /pgtablespaces and /pgindexes as well ?

I want to understand how to take backup in this scenario so I should be able to do a full PITR.

 

Thanks,

Srikar

Reply | Threaded
Open this post in threaded view
|

Re: Need help pg backup & recovery

Lætitia Avrot

 

Now I setup up full backup using pgdump and WAL logs (for PITR).

During the recovery will the pgdump recovers /pgtablespaces and /pgindexes as well ?

I want to understand how to take backup in this scenario so I should be able to do a full PITR.



Hi,

pg_dump is a logical backup. You can't apply WAL on top of it. You can't PITR out of a logical dump. To do that, you need a physical backup (look at pg_basebackup, pg_barman, pg_backrest or pg_probackup) to be able to apply WALs. You'll find more informations in [that](https://www.postgresql.org/docs/current/backup.html) documentation page

Have a nice day,

Lætitia

--
Paper doesn’t grow on trees. Please print responsibly.
Reply | Threaded
Open this post in threaded view
|

RE: Need help pg backup & recovery

Srikar Vankadaru

Thanks Lætitia,

 

When I setup the physical backup with one of the tools you specified, will that recover the /pgindexes & /pgtablespaces ?

 

Thanks,

Srikar

 

 

From: Lætitia Avrot [mailto:[hidden email]]
Sent: Monday, June 10, 2019 15:57
To: Srikar Vankadaru <[hidden email]>
Cc: pgsql-novice <[hidden email]>
Subject: Re: Need help pg backup & recovery

 

 

Now I setup up full backup using pgdump and WAL logs (for PITR).

During the recovery will the pgdump recovers /pgtablespaces and /pgindexes as well ?

I want to understand how to take backup in this scenario so I should be able to do a full PITR.

 

 

Hi,

pg_dump is a logical backup. You can't apply WAL on top of it. You can't PITR out of a logical dump. To do that, you need a physical backup (look at pg_basebackup, pg_barman, pg_backrest or pg_probackup) to be able to apply WALs. You'll find more informations in [that](https://www.postgresql.org/docs/current/backup.html) documentation page

Have a nice day,

Lætitia

 

--

Paper doesn’t grow on trees. Please print responsibly.

Reply | Threaded
Open this post in threaded view
|

Re: Need help pg backup & recovery

Andreas Kretschmer-3


Am 10.06.19 um 12:29 schrieb Srikar Vankadaru:
> When I setup the physical backup with one of the tools you specified,
> will that recover the /pgindexes & /pgtablespaces ?

yeah, but please read the documentation first. The Barman-docu contains
a chapter about Tablespace remapping.


Regards, Andreas

--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com