Database Reference
In-Depth Information
Steps 6 and 10 enable and disable archiving, so that we only store copies of the WAL files
created during the period of the backup. So, steps 1 to 5 are setup, and steps 6 to 10 are
where the backup happens. Steps 11 onwards are gift wrapping, so that the backup script
ends with everything in one neat file.
Step 11 moves the archived files under the data directory, a more convenient location from
which to restore. Step 12 appends the WAL files to the backup file, so it is just one file.
Steps 3-14 add a recovery.conf file with its parameters setup so that there are no manual
steps when we recover from this backup. This isn't explained here; look at the recipe on
Recovery of all databases .
The key to understanding this is that we need both the base backup and the appropriate
archived WAL files to allow us to recover. Without both of those things, we have nothing. Most of
the steps are designed to ensure that we really will have the appropriate WAL files in all cases.
See also
It's common to use continuous archiving when using the physical backup technique, because
that allows you to recover to any point in time, should you need that.
Hot physical backup & Continuous Archiving
This recipe describes how to set up a hot physical backup with a continuous archiving
mechanism. The purpose of the continuous archiving is to allow us to recover to any point
in time from the time of the backup to the time onwards.
Getting ready
This recipe builds upon the previous recipe to take a Standalone hot physical backup .
You should read that first before following this recipe.
You need to decide a few things, which are as follows:
F Where will you store the WAL files (known as the "archive")?
F How will you send WAL files to the archive?
F Where will you store your base backups?
F How will you take my base backups?
F How many backups will you keep? What is your policy for maintaining the archive?
These are hard questions to answer immediately. So, we give a practical example as a way of
explaining how this works, and then let the user decide how they would like it to operate.
 
Search WWH ::




Custom Search