Help With Database Backup
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-tp25680203p2 5680203.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Re: Help With Database Backup
On Wed, Sep 30, 2009 at 6:38 AM, chalu <chaluwa [at] yahoo.com> wrote:
>
> Hello there, I am new to PostgreSQL, succeded in running a little databas=
e 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 onli=
ne.
>
> Am I missing something, I'll appreciate suggestions / links =A0e.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
--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Re: Help With Database Backup
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
--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Re: Help With Database Backup
<06871E18-3ECD-4BF8-95C8-A5C4D70B88F8 [at] networkmail.eu>
MIME-Version: 1.0
--_38205d22-cd04-45e8-94db-7b1efe22502f_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
> Subject: Re: [ADMIN] Help With Database Backup
> From: andy-lists [at] networkmail.eu
> Date: Wed=2C 30 Sep 2009 22:24:27 +0100
> CC: pgsql-admin [at] postgresql.org
> To: chaluwa [at] yahoo.com
>
> Hi=2C
>
> >
> > Hello there=2C I am new to PostgreSQL=2C 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=2C 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=2C
> Andy
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
=
--_38205d22-cd04-45e8-94db-7b1efe22502f_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<style><!--
..hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Verdana
}
--></style>
</head>
<body class=3D'hmmessage'>
<br><br>>=3B Subject: Re: [ADMIN] Help With Database Backup<br>>=3B Fro=
m: andy-lists [at] networkmail.eu<br>>=3B Date: Wed=2C 30 Sep 2009 22:24:27 +0=
100<br>>=3B CC: pgsql-admin [at] postgresql.org<br>>=3B To: chaluwa [at] yahoo.co=
m<br>>=3B <br>>=3B Hi=2C<br>>=3B <br>>=3B >=3B<br>>=3B >=3B H=
ello there=2C I am new to PostgreSQL=2C succeded in running a little <br>&=
gt=3B >=3B database on<br>>=3B >=3B my dev. machine and now I am havi=
ng problems exporting the local <br>>=3B >=3B database to<br>>=3B &g=
t=3B the one I want to use on my site online. I am getting errors when I <=
br>>=3B >=3B try to<br>>=3B >=3B run the SQL online with phpPgAdmin=
..<br>>=3B <br>>=3B What errors are you getting? It's impossible to giv=
e you any help <br>>=3B unless you can provide a bit more information.<b=
r>>=3B <br>>=3B >=3B<br>>=3B >=3B I exported / backup the local d=
atabase using pgAmin=2C I choose the <br>>=3B >=3B PLAIN<br>>=3B >=
=3B format and then selected the No Owner option as well as the Schema <br=
>>=3B >=3B Only<br>>=3B >=3B option (how canI export schema and dat=
a at once).<br><br>as postgresql user<br>pg_dump dbname >=3B anyname.out<=
br>copy the .out file to your target box<br><br>in your target box as postg=
resql user<br><br>createdb dbname<br>psql dbname -f anyname.out<br><br><br>=
<br>>=3B <br>>=3B I believe if you don't select "schema only" you get s=
chema and data.<br>>=3B <br>>=3B Regards=2C<br>>=3B Andy<br>>=3B <b=
r>>=3B -- <br>>=3B Sent via pgsql-admin mailing list (pgsql-admin [at] postg=
resql.org)<br>>=3B To make changes to your subscription:<br>>=3B http:/=
/www.postgresql.org/mailpref/pgsql-admin<br> </body>
</html>=
--_38205d22-cd04-45e8-94db-7b1efe22502f_--