Database Reference
In-Depth Information
Planning backups
This section is all about thinking ahead and planning. If you're reading this section before you
take a backup, well done.
The key thing to understand is that you should plan your recovery, not your backup. The type
of backup you take influences the type of recovery that is possible, so you must give some
thought to what you are trying to achieve beforehand.
If you want to plan your recovery, then you need to consider the different types of failures that
can occur. What type of recovery do you wish to perform?
You need to consider the following main aspects:
F Full/Partial database?
F Everything or just object definitions only?
F Point In Time Recovery
F Restore performance
We need to look at the characteristics of the utilities to understand what our backup and
recovery options are. It's often beneficial to have multiple types of backup to cover the
different types of failure possible.
Your main backup options are
F logical backup—using pg_dump
F physical backup—file system backup
pg_dump comes in two main flavors: pg_dump and pg_dumpall . pg_dump has a -F option
to produce backups in various file formats. The file format is very important when it comes to
restoring from backup, so you need to pay close attention to that.
The following table shows the features available, depending upon the backup technique
selected. The details of these techniques are covered in the remaining recipes in this chapter.
 
Search WWH ::




Custom Search