Обсуждение: Help With Database Backup

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

Help With Database Backup

От
chalu
Дата:
Hello there, I am new to PostgreSQL, succeded in running a little database on
my dev. machine and now I am having problems exporting the local database to
the one I want to use on my site online. I am getting errors when I try to
run the SQL online with phpPgAdmin.

I exported / backup the local database using pgAmin, I choose the PLAIN
format and then selected the No Owner option as well as the Schema Only
option (how canI export schema and data at once).
It is the SQL statements from the backup that I am trying to execute online.

Am I missing something, I'll appreciate suggestions / links  e.t.c
Kind Regards.

-----
Charles Odili
 Xchequer Nigeriia

--
View this message in context: http://www.nabble.com/Help-With-Database-Backup-tp25680203p25680203.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Re: Help With Database Backup

От
Scott Marlowe
Дата:
On Wed, Sep 30, 2009 at 6:38 AM, chalu <chaluwa@yahoo.com> wrote:
>
> Hello there, I am new to PostgreSQL, succeded in running a little database on
> my dev. machine and now I am having problems exporting the local database to
> the one I want to use on my site online. I am getting errors when I try to
> run the SQL online with phpPgAdmin.
>
> I exported / backup the local database using pgAmin, I choose the PLAIN
> format and then selected the No Owner option as well as the Schema Only
> option (how canI export schema and data at once).
> It is the SQL statements from the backup that I am trying to execute online.
>
> Am I missing something, I'll appreciate suggestions / links  e.t.c
> Kind Regards.

What error message are you getting?  The most common problem is
running restore against a db that already has part of the schema in
place.  You might need to dropdb / createdb a new db for it to work.
Just guessing tho

Re: Help With Database Backup

От
"Andy Shellam (Mailing Lists)"
Дата:
Hi,

>
> Hello there, I am new to PostgreSQL, succeded in running a little
> database on
> my dev. machine and now I am having problems exporting the local
> database to
> the one I want to use on my site online. I am getting errors when I
> try to
> run the SQL online with phpPgAdmin.

What errors are you getting?  It's impossible to give you any help
unless you can provide a bit more information.

>
> I exported / backup the local database using pgAmin, I choose the
> PLAIN
> format and then selected the No Owner option as well as the Schema
> Only
> option (how canI export schema and data at once).

I believe if you don't select "schema only" you get schema and data.

Regards,
Andy

Re: Help With Database Backup

От
Julio Leyva
Дата:


> Subject: Re: [ADMIN] Help With Database Backup
> From: andy-lists@networkmail.eu
> Date: Wed, 30 Sep 2009 22:24:27 +0100
> CC: pgsql-admin@postgresql.org
> To: chaluwa@yahoo.com
>
> Hi,
>
> >
> > Hello there, I am new to PostgreSQL, succeded in running a little
> > database on
> > my dev. machine and now I am having problems exporting the local
> > database to
> > the one I want to use on my site online. I am getting errors when I
> > try to
> > run the SQL online with phpPgAdmin.
>
> What errors are you getting? It's impossible to give you any help
> unless you can provide a bit more information.
>
> >
> > I exported / backup the local database using pgAmin, I choose the
> > PLAIN
> > format and then selected the No Owner option as well as the Schema
> > Only
> > option (how canI export schema and data at once).

as postgresql user
pg_dump dbname > anyname.out
copy the .out file to your target box

in your target box as postgresql user

createdb dbname
psql dbname -f anyname.out



>
> I believe if you don't select "schema only" you get schema and data.
>
> Regards,
> Andy
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin