How to save and restore a template database ?

Started by DANTE Alexandraabout 20 years ago3 messagesgeneral
Jump to latest
#1DANTE Alexandra
Alexandra.Dante@bull.net

Hello,

We have a question concerning backup / restore of database.
Is it right if we say that for having a complete backup, we have do :
1. use pg_dumpall
2. do a backup of the modified "template1" database with pg_dump ?

Our question is how to save and restore a template database, as
"template1" ?

Regards,
Agn�s BOCCHINO & Alexandra DANTE

#2Michael Fuhr
mike@fuhr.org
In reply to: DANTE Alexandra (#1)
Re: How to save and restore a template database ?

On Thu, Mar 02, 2006 at 05:17:12PM +0100, DANTE ALEXANDRA wrote:

We have a question concerning backup / restore of database.
Is it right if we say that for having a complete backup, we have do :
1. use pg_dumpall
2. do a backup of the modified "template1" database with pg_dump ?

Our question is how to save and restore a template database, as
"template1" ?

pg_dumpall should dump the modified contents of template1. Is it
not doing so? What version of PostgreSQL are you using?

--
Michael Fuhr

#3Agnes Bocchino
agnes.bocchino@bull.net
In reply to: Michael Fuhr (#2)
Re: How to save and restore a template database ?

Michael Fuhr wrote:

On Thu, Mar 02, 2006 at 05:17:12PM +0100, DANTE ALEXANDRA wrote:

We have a question concerning backup / restore of database.
Is it right if we say that for having a complete backup, we have do :
1. use pg_dumpall
2. do a backup of the modified "template1" database with pg_dump ?

Our question is how to save and restore a template database, as
"template1" ?

pg_dumpall should dump the modified contents of template1. Is it
not doing so? What version of PostgreSQL are you using?

Thanks Michael,
we use a 8.1.2 release and we first make tests to
understand how pg_dump works .The first test was without a template1
modified.

We redo this morning the test but with a modified template1,
and yes it works fine

Alexandra, Agn�s