After taking a look at the big picture, we can see how things can be put to work.
The first thing you have to do when it comes to Point-in-time Recovery is archive the XLOG. PostgreSQL offers all the configuration options related to archiving through postgresql.conf
.
Let us see step by step what has to be done in postgresql.conf
to start archiving:
First of all, you should turn
archive_mod
e on.In the second step, you should configure your
archive_command
. Thearchive_command
is a simple shell, and it needs just two parameters to operate properly:
Let's set up archiving now. To do so, we should create a place to put the XLOG. Ideally, the XLOG is not stored on the same hardware as the database instance you want to archive. For the sake of this example, we assume that we want to copy...