Skip site navigation (1) Skip section navigation (2)

Re: Restaring a dumped database

From: Mohlomi Moloi <mmoloi(at)khulisa(dot)com>
To: Frank Bax <fbax(at)sympatico(dot)ca>, PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Restaring a dumped database
Date: 2010-11-10 13:34:28
Message-ID: 1796530656.10391289396068344.JavaMail.root@scalix.khulisa.com (view raw or flat)
Thread:
Lists: pgsql-novice
Bigger measured by looking at the previous size of the database - that was 34 megabytes and the restored was 800 megabytes. What I noticed was some of my table had triple the amount of rows in contrast to the old database. :)    

----- Original Message -----
From: "Frank Bax" <fbax(at)sympatico(dot)ca>
Sent: Wed, 11/10/2010 2:41pm
To: "PostgreSQL List - Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: [NOVICE] Restaring a dumped database

How did you measure "bigger"?


Mohlomi Moloi wrote:
> Thanks for the help Frank!! However I'm now faced with a question - Why my database after the restore worked, all of a sudden grew bigger.
> 
> Thanks,
> 
> Mohlomi  Moloi
> 
> ----- Original Message -----
> From: "Frank Bax" <fbax(at)sympatico(dot)ca>
> Sent: Mon, 11/8/2010 2:19pm
> To: "PostgreSQL List - Novice" <pgsql-novice(at)postgresql(dot)org>
> Subject: Re: [NOVICE] Restaring a dumped database
> 
> Mohlomi Moloi wrote:
>> Hi Everyone,
>>
>> I’ve used the following script for my dump; pg_dump -h 127.0.0.1 -p 5432 
>> -U mohlomi -F p teleform  > "teleform_Backup.dump" – and it worked fine.
>>
>> After my dump, I dropped the database teleform - My nightmare starts 
>> when I try to restore and I get error massages that the database dropped 
>> already exist etc...
>>
>> I used the script psql -h 127.0.0.1 -p 5432 -U mohlomi -d teleform < 
>> "teleform_Backup.dump" for restoring the database.
>>
>> Funny enough the above scripts works at a table level!!!
>>
>> Any assistance will be welcomed.
> 
> 
> 
> If you are trying to restore over an existing database; then you should 
> either:
> 1) use -c option on pg_dump.
> 2) manually drop all tables, indexes and database.
> 


Responses

pgsql-novice by date

Next:From: Devrim GÜNDÜZDate: 2010-11-10 14:59:02
Subject: Re: ODBC driver for PostgreSQL 9.0
Previous:From: Frank BaxDate: 2010-11-10 12:41:48
Subject: Re: Restaring a dumped database

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group