[KLUG Members] MySQL pgSQL backups

John Pesce members@kalamazoolinux.org
Mon, 26 Aug 2002 16:38:00 -0400 (EDT)


Hello again. As I mentioned before. I've inherited a mysql and a postgres
server and I need to combine them on a new server.
I visted the postgresql.org admin manual. I'm completely new to databases.
The manual mentions that pg_dump backs up a database, but that pg_dumpall
backs everything up. Later on it mentions that pg_dumpall really doesn't
backup everything, it skips OIDs and "Large Objects".

1) What are OIDs?
2) What is a "Large Object"?
3) How do I know if I have OIDs or "Large Objects"

I ran, as user postgres, pg_dumpall >db_back

on the new RH 7.3 server I ran:

initdb -D /var/lib/pgsql/data

which seems to create a template0 and template1 database.

if I do a psql < db_back it gives me an error.
psql: FATAL 1:  Database "postgres" does not exist in the system catalog.

if I run psql -l on the old server it says there are three databases
capacity, postgres and template1

if I do a psql -d template1 <db_back, like the manual gives as an example,
I get the error:

You are now connected to database template1.
SELECT
DELETE 0
DROP
DELETE 0
You are now connected to database template1 as user postgres.
CREATE DATABASE
You are now connected to database postgres as user postgres.
\connect: FATAL 1:  IDENT authentication failed for user "florian"

I thought the entire database including users was suppost to be dumped??


On Thu, 22 Aug 2002, Adam Bultman wrote:

> Easiest way to dump a mysql database:
> mysql_dump <databasename> > filename
>
> pg:
>
> pg_dump <databasename> > filename.
>
>
> Recreate the dbs (createdb, I believe) then:
>
> mysql <databasename> < filename
>
>
> psql <databasename> < filename
>
>
> You have your databases back with all the same permissions.
> Woo!
>
>
> On Thu, 22 Aug 2002, John Pesce
> wrote:
>
> > Hi all,
> >
> > I've inherited a web-server running a MySQL database and another
> > running a pgSQL database. Both have RH 7.0 on them with ext2 file-systems.
> >
> > I would like to combine them on a newer server running RH 7.3 and ext3.
> > Unfortunately I've never worked with a database before.
> >
> > Can I simply keep the configuration files and copy the data directory or
> > is there some database backup and restore process I need to use??
> >
> > Thanks
> >
> >
> > _______________________________________________
> > Members mailing list
> > Members@kalamazoolinux.org
> > 
> >
>
>