Extracting a logical backup from a physical one
Once you have a physical backup, you can extract a logical backup from it, applying some of the recipes that we have already seen.
This recipe is quite short because it is essentially a combination of recipes that we have already described. Nevertheless, it is important because it clarifies that you don't need to worry about extracting logical backups, if you already have physical ones.
Getting ready
You just need to decide whether you want to extract a logical backup corresponding to a specific point in time or simply to the latest available snapshot.
How to do it…
First, perform a PITR, as indicated in the Recovery to a point in time recipe earlier in this chapter. If you want a logical backup corresponding to the latest available snapshot, just omit the --target-time
clause. Then, follow the Hot logical backups of one database recipe to take a logical backup from the temporary instance.
Finally...