Re: question

From: anj patnaik <patna73(at)gmail(dot)com>
To: Francisco Olarte <folarte(at)peoplecall(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Scott Mead <scottm(at)openscg(dot)com>, Melvin Davidson <melvin6925(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: question
Date: 2015-10-23 22:07:47
Message-ID: CAEQKwSmyVwfuSM5ctV83Fn9e+qGNX07tOwQP-FavcntDGfZmdw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks Adrian. I've got postgres 9.4 running on a second RHEL 6.5 machine.
This is the machine I want to restore the pg_dump to.

Last week, I ran this command on the main PG 9.4 db server:

./pg_dump -t RECORDER -Fc postgres -Z0 | xz -9 > /tmp/dump_xz

The -Z0 turns off compression. So I used xz and noticed the file was not
that big.

Now, I got PG 9.4 running today on a 2nd machine. I just did the initdb,
started service, updated the hba.conf and postgres.conf to accept
connections from the outside and then restarted service.

1) When i attempt to restore the archived, I get an error to provide
password and I am confused what to do here.

2) is it correct to do xzcat and then pipe that to pgsl? I want to restore
on mymachine.com

3) on the target machine, I ran initdb and by default it creates postgres.
Will that be a problem when restoring?

On this machine I am connected as root.

xzcat dump_xz |/opt/PostgreSQL/9.4/bin/psql -h mymachine.com postgres
Password:

Thank you!

On Sat, Oct 17, 2015 at 7:42 AM, Francisco Olarte <folarte(at)peoplecall(dot)com>
wrote:

> Hi Anj:
>
> On Sat, Oct 17, 2015 at 3:11 AM, anj patnaik <patna73(at)gmail(dot)com> wrote:
> > My question is for Francisco who replied regarding xz. I was curious what
> > options he used. Thanks.
>
> 1st, we do not normally top post on this list.
>
> Second, I do not remember the exact options I use. I can look them up,
> but they are going to be surely useless ( they are for a custom
> process with does several things with files, it uses gzip ( in Fc
> backups ), plus xz ( for some files which need to be kept for a long
> time and are nearly never needed ), plus lzo ( as I found lzo
> compressed temporary files were faster than uncompressed ones ), and a
> lot of code. But in the development process we did a full comparison
> of several compressor, and found what I stated with bzip2, it was
> surpassed in every combination of options by xz ( plain bzip2, plain
> xz ).
>
> Francisco Olarte.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message anj patnaik 2015-10-23 22:22:59 Re: question
Previous Message Adrian Klaver 2015-10-23 20:19:27 Re: Fwd: trouble downloading postgres 9.4 for RHEL 6.x