On 10/23/2015 03:22 PM, anj patnaik wrote:
Quick update on the above:
1) I got past the password prompt by changing the pg_hba.conf on target
machine to trust.
2) I am still running this command to restore on remote machine and want
feedback as it appears to NOT create the desired table:
xzcat dump_xz |/opt/PostgreSQL/9.4/bin/psql -h mycomp.com
<http://mycomp.com> postgres -U postgres
I do not see that working for the reason below:
/pg_dump -t RECORDER -Fc postgres -Z0 | xz -9 > /tmp/dump_xz
http://www.postgresql.org/docs/9.4/interactive/app-pgdump.html
"
F format
--format=format
Selects the format of the output. format can be one of the following:
p
plain
Output a plain-text SQL script file (the default).
c
custom
Output a custom-format archive suitable for input into
pg_restore. Together with the directory output format, this is the most
flexible output format in that it allows manual selection and reordering
of archived items during restore. This format is also compressed by
default. "
In particular- 'Output a custom-format archive suitable for input into
pg_restore. '
psql will not know what to do with this.
Thanks.
On Fri, Oct 23, 2015 at 6:07 PM, anj patnaik <patna73@xxxxxxxxx
<mailto:patna73@xxxxxxxxx>> wrote:
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 <http://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
<http://mymachine.com> postgres
Password:
Thank you!
On Sat, Oct 17, 2015 at 7:42 AM, Francisco Olarte
<folarte@xxxxxxxxxxxxxx <mailto:folarte@xxxxxxxxxxxxxx>> wrote:
Hi Anj:
On Sat, Oct 17, 2015 at 3:11 AM, anj patnaik <patna73@xxxxxxxxx
<mailto:patna73@xxxxxxxxx>> 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.
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general