Обсуждение: Upgrade to PGSQL 8.2 Problem

Поиск
Список
Период
Сортировка

Upgrade to PGSQL 8.2 Problem

От
Дата:
hi all,

i'm trying to upgrade my windows dev box to pgsql 8.2.
 i currently have 8.1 istalled.

i've read through the docs and here is what i want to
do:

1. install 8.2.0-1 alongside 8.1.
2. pg_dumpall > db.out # using 8.2's psql.
3. path to psql.exe> psql -d postgres -f db.out #
using 8.2's psql.

before i get started, though, i want to pg_dumpall
from my current installation (8.1).

1. start  windows' cli
2. navigate to psql.exe directory
3. psql [db name]
4. [db name]-# pg_dumpall db.out

after i hit enter, it returns the psql command line:

[db name]-#

when i search my file system for db.out, though, it
doesn't exist.

what am i doing wrong?  i have been doing this via
pgadmin in the past (maybe once or twice in a couple
years), but i want to get more familiar with the the
cli and psql.

tia...

oe1




____________________________________________________________________________________
Any questions? Get answers on any topic at www.Answers.yahoo.com.  Try it now.

Re: Upgrade to PGSQL 8.2 Problem

От
Дата:
--- Phillip Smith <phillip.smith@weatherbeeta.com.au>
wrote:

> Do you not need to redirect the output with a '>'
> symbol?
>     4. [db name]-# pg_dumpall > db.out
>
> That's how we do it on Linux anyway :D
>
> -p

Phillip, yes, you are correct.  i did, however, i
didn't include it in my email description (my
apologize for adding confusion).

1. start  windows' cli
2. navigate to psql.exe directory
3. psql [db name]
4. [db name]-# pg_dumpall > db.out

after i hit enter, it quickly returns the psql command
line:

[db name]-#

however, db.out is nowhere to be found on my c: drive.



____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited

Re: Upgrade to PGSQL 8.2 Problem

От
Richard Broersma Jr
Дата:
> >     4. [db name]-# pg_dumpall > db.out

Are you specifing the postgres username and and password for pg_dumpall.

Regards,

Richard Broersma Jr.

Re: Upgrade to PGSQL 8.2 Problem

От
Sean Davis
Дата:
operationsengineer1@yahoo.com wrote:
> hi all,
>
> i'm trying to upgrade my windows dev box to pgsql 8.2.
>  i currently have 8.1 istalled.
>
> i've read through the docs and here is what i want to
> do:
>
> 1. install 8.2.0-1 alongside 8.1.
> 2. pg_dumpall > db.out # using 8.2's psql.
> 3. path to psql.exe> psql -d postgres -f db.out #
> using 8.2's psql.
>
> before i get started, though, i want to pg_dumpall
> from my current installation (8.1).
>
> 1. start  windows' cli
> 2. navigate to psql.exe directory
> 3. psql [db name]
> 4. [db name]-# pg_dumpall db.out
>
> after i hit enter, it returns the psql command line:
>
> [db name]-#
>
> when i search my file system for db.out, though, it
> doesn't exist.
>
> what am i doing wrong?  i have been doing this via
> pgadmin in the past (maybe once or twice in a couple
> years), but i want to get more familiar with the the
> cli and psql.
>
pg_dumpall is a command-line program, just like psql.  It is not run
from within psql.  It looks like that is your confusion.

Sean

Re: Upgrade to PGSQL 8.2 Problem

От
Дата:
--- Sean Davis <sdavis2@mail.nih.gov> wrote:

> operationsengineer1@yahoo.com wrote:
> > hi all,
> >
> > i'm trying to upgrade my windows dev box to pgsql
> 8.2.
> >  i currently have 8.1 istalled.
> >
> > i've read through the docs and here is what i want
> to
> > do:
> >
> > 1. install 8.2.0-1 alongside 8.1.
> > 2. pg_dumpall > db.out # using 8.2's psql.
> > 3. path to psql.exe> psql -d postgres -f db.out #
> > using 8.2's psql.
> >
> > before i get started, though, i want to pg_dumpall
> > from my current installation (8.1).
> >
> > 1. start  windows' cli
> > 2. navigate to psql.exe directory
> > 3. psql [db name]
> > 4. [db name]-# pg_dumpall db.out
> >
> > after i hit enter, it returns the psql command
> line:
> >
> > [db name]-#
> >
> > when i search my file system for db.out, though,
> it
> > doesn't exist.
> >
> > what am i doing wrong?  i have been doing this via
> > pgadmin in the past (maybe once or twice in a
> couple
> > years), but i want to get more familiar with the
> the
> > cli and psql.
> >
> pg_dumpall is a command-line program, just like
> psql.  It is not run
> from within psql.  It looks like that is your
> confusion.
>
> Sean

Sean, i agree.  that is my confusion. alright.  i'll
try it tomorrow.  i'll follow Richard's advice and do
the user and password options.  hopefully, all goes
well.

thanks for clarifying this.

oe1



____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited

Re: Upgrade to PGSQL 8.2 Problem

От
Aarni Ruuhimäki
Дата:
On Thursday 14 December 2006 08:52, operationsengineer1@yahoo.com wrote:
> > pg_dumpall is a command-line program, just like
> > psql.  It is not run
> > from within psql.  It looks like that is your
> > confusion.
> >
> > Sean
>
> Sean, i agree.  that is my confusion. alright.  i'll
> try it tomorrow.  i'll follow Richard's advice and do
> the user and password options.  hopefully, all goes
> well.
>
> thanks for clarifying this.
>
> oe1

So instead of

> > 3. psql [db name]
> > 4. [db name]-# pg_dumpall db.out

you should do something like this (on linux):

/path/to/pg_bin/pg_dumpall > /path/to/dump/dir/db.out

or maybe

/path/to/pg_bin/pg_dumpall -c > /path/to/dump/dir/db.out

and then

/path/to/pg_bin/psql [-E template1 | ENCODING] < ../db.out

BR,

--
Aarni Ruuhimäki


Re: Upgrade to PGSQL 8.2 Problem

От
Richard Broersma Jr
Дата:
> Sean, i agree.  that is my confusion. alright.  i'll
> try it tomorrow.  i'll follow Richard's advice and do
> the user and password options.  hopefully, all goes
> well.

I am currently working on a dos .bat file that will create dumpfiles.  In my case I want to add
the system date to the dump files name so that any older dumpfiles do not get overwritten.  Once
my script is finished I plan to called it from the windows scheduler to preform a backup once a
day.

If you are interested I will post it once I am finished.  However, be warned that my dos/bat
scripting skills are very weak so don't expect an elegant solution. :-)

This is the closest solution to the shell script and cron job that I can get with default windows.

Regards,

Richard Broersma Jr.