Re: PgBackrest questions - Mailing list pgsql-general

From Stephen Frost
Subject Re: PgBackrest questions
Date
Msg-id 20180314221701.GO2416@tamriel.snowman.net
Whole thread Raw
In response to PgBackrest questions  (chiru r <chirupg@gmail.com>)
Responses Re: PgBackrest questions  (chiru r <chirupg@gmail.com>)
List pgsql-general
Greetings,

* chiru r (chirupg@gmail.com) wrote:
> I am testing Pgbackrest and I have few questions.

Great!

> 1. I used postures user to perform backups and restores with Pgbackrest
> tool.
> The Trust authentication in pg_hba.conf file is working without issues.

Please don't use 'trust'.

> If I use md5 authentication in pg_hba_conf file and postgres user password
> .pgpass file, the pgbackrest backup is failing.

There really shouldn't ever be a need to use md5 authentication with
pgbackrest.  Instead, I'd strongly suggest you use 'peer'.  The 'peer'
method is perfectly safe as it depends on the authentication which
Unix provides, but it doesn't require a password or any of the
associated complications.  Note that 'trust' should *not* be used and
I'm glad to see that you're looking for alternatives to using 'trust'.

> 2.  All the restores through the backrest is going to refer the  Wal
> archive files under archive/<stanza name>/* directory, which are taken from
> pgbackrest?

When pgbackrest performs a restore, it will write out the recovery.conf
file for you which includes the restore command to pull the WAL from the
repo and stanza configured.  You shouldn't need to worry about where
those files are, specifically, coming from (and it's even possible that
it might change in the future...).  Is there a specific reason you're
asking?

> 3. What is the compression level by default in pgbackrest?

pgbackrest will use different compression levels depending on what
you're doing.  If your repo is compressed (the default), then zlib level
6 is used.  If you're storing your repo as uncompressed, then pgbackrest
will use level 3 compression for the network transfer.

Note that, in any case, pgbackrest only performs compression once- at
the source.  If the repo is compressed the the data is compressed to
level 6 at the source and then streamed directly out to disk in that
compressed form.  If the repo is uncompressed, then the data is
compressed to level 3 at the source and then decompressed before going
into the repo.

Thanks!

Stephen

Attachment

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: JDBC connectivity issue
Next
From: Alexander Farber
Date:
Subject: Re: Extract elements from JSON array and return them as concatenated string