How to do it...

For the purposes of this recipe, we'll be using an Amazon S3 user account with associated access keys identified as key-id and key-value. We've also created a bucket we'll refer to as bucket-path, which is located in the aws-region zone. Follow these steps to install and configure WAL-E:

  1. Use pip3 to install WAL-E and a complementary environment utility:
        sudo pip3 install wal-e envdir
  1. Install the necessary WAL-E cloud driver (Amazon in our case) with this command:
        sudo pip3 install boto
          sudo python3 -c 'import boto; print(boto.__path__[0])' \
             | xargs -I{} sudo chmod -R a+rx {}
  1. Create a configuration directory readable by the postgres system user:
        sudo mkdir -m 0750 -p /etc/wal-e/env
        sudo chgrp -R postgres /etc/wal-e ...

Get PostgreSQL High Availability Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.