Re: question - Mailing list pgsql-general

From anj patnaik
Subject Re: question
Date
Msg-id CAEQKwSmyVwfuSM5ctV83Fn9e+qGNX07tOwQP-FavcntDGfZmdw@mail.gmail.com
Whole thread Raw
In response to Re: question  (Francisco Olarte <folarte@peoplecall.com>)
Responses Re: question
List 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@peoplecall.com> wrote:
Hi Anj:

On Sat, Oct 17, 2015 at 3:11 AM, anj patnaik <patna73@gmail.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.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Recursive Arrays 101
Next
From: anj patnaik
Date:
Subject: Re: question