Backup&Restore Postgres DB

From: blast <carlosd2002(at)hotmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Backup&Restore Postgres DB
Date: 2010-03-22 10:38:20
Message-ID: 27984540.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Hi all,

I need to backup and restore a DB.
In this particular case the data in the database is not important (strange
hum...) but only the schema to put new data...

I m thinking use the pg_dump:

pg_dump -c -C -s schema > file.out

With this i have in file.out the schema, correct?

So, to restore the db from scratch, for example to a new system, what should
i do?
it automatically creates all users, rolls, permissions etc?How?

What is the best way of doing it?

Many thanks

--
View this message in context: http://old.nabble.com/Backup-Restore-Postgres-DB-tp27984540p27984540.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2010-03-22 12:26:59 Re: pg_resetxlog: command not found
Previous Message Iñigo Martinez Lasala 2010-03-22 08:48:31 Bad encoded chars in being inserted into database