Re: PgBackrest questions

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: chiru r <chirupg(at)gmail(dot)com>
Cc: Forums postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: PgBackrest questions
Date: 2018-03-14 22:17:01
Message-ID: 20180314221701.GO2416@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

* chiru r (chirupg(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2018-03-14 22:27:05 Re: Extract elements from JSON array and return them as concatenated string
Previous Message Adrian Klaver 2018-03-14 21:27:37 Re: JDBC connectivity issue