Howto repair template1

Started by Jan Poslusnyalmost 21 years ago3 messagesgeneral
Jump to latest
#1Jan Poslusny
pajout@gingerall.cz

Hi,
my colleague unfortunately ran some database dump in template1 on our
production server, pg7.3.5. Can we drop template1, dump template0 and
rebuild template1 from this dump? Or does exist some better way how to
repair template1 without any affect of living database instances?

Thanks,

pajout

#2Richard Huxton
dev@archonet.com
In reply to: Jan Poslusny (#1)
Re: Howto repair template1

Jan Poslusny wrote:

Hi,
my colleague unfortunately ran some database dump in template1 on our
production server, pg7.3.5. Can we drop template1, dump template0 and
rebuild template1 from this dump? Or does exist some better way how to
repair template1 without any affect of living database instances?

When you recreate template1, you can specify template0 as the template
to use (if you see what I mean)

createdb --template template0 template1

--
Richard Huxton
Archonet Ltd

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jan Poslusny (#1)
Re: Howto repair template1

Jan Poslusny <pajout@gingerall.cz> writes:

my colleague unfortunately ran some database dump in template1 on our
production server, pg7.3.5. Can we drop template1, dump template0 and
rebuild template1 from this dump? Or does exist some better way how to
repair template1 without any affect of living database instances?

See
http://techdocs.postgresql.org/techdocs/pgsqladventuresep1.php

regards, tom lane