Re: [GENERAL] How to recover my postgres database ?

2017-05-11 Thread Pierre Couderc

On 05/11/2017 07:10 PM, John R Pierce wrote:

On 5/11/2017 9:53 AM, Pierre Couderc wrote:

I have broken my postgres database by typing :

psql How can I safely repair, knowing that I have the pg_dumpall of last  
night, but many dbs have changed today... ?


Thanks in advance 



was there anything in the postgres database other than the default?

Not at my knowledge...


psql template1 -c "drop database postgres; create database postgres 
with template template0"



should restore it to a virgin stock empty 'postgres'


Thank you, I do that. This is what I looked for !


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] How to recover my postgres database ?

2017-05-11 Thread Pierre Couderc

On 05/11/2017 07:07 PM, Hunley, Douglas wrote:


On Thu, May 11, 2017 at 11:53 AM, Pierre Couderc <pie...@couderc.eu 
<mailto:pie...@couderc.eu>> wrote:


How can I safely repair, knowing that I have the pg_dumpall of
last  night, but many dbs have changed today... ?


If pg_dumpall is your only backup mechanism then you've lost all 
changes after the dump was taken. You'll need to restore from that 
backup and then get pgbackrest (or another equivalent tool) up and 
running to protect yourself going forward



Mmm, there is some misunderstanding. I have lost nothing.
All my DBs are ok.
I am speaking of the specific "postgres" database that you connect to with
\c postgres
What is its use ? how to restore it ?




[GENERAL] How to recover my postgres database ?

2017-05-11 Thread Pierre Couderc

I have broken my postgres database by typing :

psql How can I safely repair, knowing that I have the pg_dumpall of last  
night, but many dbs have changed today... ?


Thanks in advance




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general