Обсуждение: Backup complete

Поиск
Список
Период
Сортировка

Backup complete

От
Adarsh Sharma
Дата:
Dear all,

I take backup of postgres databases with pg_dump command.
But it didn't take backup of all sequences,views & functions in
different databases.

I want to know how we can complete backup so we can get complete data
after restoring from a single file.

I faced errors when dumping data from one system to another , if the
same sequence doesn't exist in the other system.


Thanks

Re: Backup complete

От
Raymond O'Donnell
Дата:
On 27/07/2011 10:51, Adarsh Sharma wrote:
> Dear all,
>
> I take backup of postgres databases with pg_dump command.
> But it didn't take backup of all sequences,views & functions in
> different databases.

That's because you told it to backup only the postgres database. pg_dump
only dumps a single database. If you want to backup all databases in the
cluster, use pg_dumpall.

You should read up on the two commands in the documentation:

  http://www.postgresql.org/docs/9.0/static/reference-client.html

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

Re: Backup complete

От
Adarsh Sharma
Дата:
Raymond O'Donnell wrote:
On 27/07/2011 10:51, Adarsh Sharma wrote: 
Dear all,

I take backup of postgres databases with pg_dump command.
But it didn't take backup of all sequences,views & functions in
different databases.   
That's because you told it to backup only the postgres database. pg_dump
only dumps a single database. If you want to backup all databases in the
cluster, use pg_dumpall.

You should read up on the two commands in the documentation:
 http://www.postgresql.org/docs/9.0/static/reference-client.html

Ray.
 
Thanks Raymond, I know that but did it take the backups of procedures & views too.


Adarsh

Re: Backup complete

От
"C. Bensend"
Дата:
> I take backup of postgres databases with pg_dump command.
> But it didn't take backup of all sequences,views & functions in
> different databases.
>
> I want to know how we can complete backup so we can get complete data
> after restoring from a single file.
>
> I faced errors when dumping data from one system to another , if the
> same sequence doesn't exist in the other system.

Check out pg_dumpall:

http://www.postgresql.org/docs/current/interactive/app-pg-dumpall.html

Benny


--
"Open your door, or I open your wall."
                                 -- Seen on an image on fukung.net


Re: Backup complete

От
Raymond O'Donnell
Дата:
On 27/07/2011 11:31, Adarsh Sharma wrote:
> Raymond O'Donnell wrote:
>> On 27/07/2011 10:51, Adarsh Sharma wrote:
>>
>>> Dear all,
>>>
>>> I take backup of postgres databases with pg_dump command.
>>> But it didn't take backup of all sequences,views & functions in
>>> different databases.
>>>
>>
>> That's because you told it to backup only the postgres database. pg_dump
>> only dumps a single database. If you want to backup all databases in the
>> cluster, use pg_dumpall.
>>
>> You should read up on the two commands in the documentation:
>>
>>   http://www.postgresql.org/docs/9.0/static/reference-client.html
>>
>> Ray.
>>
>>
> Thanks Raymond, I know that but did it take the backups of procedures &
> views too.
>
>
> Adarsh

Hi Adarsh,

Yes, pg_dump backs up everything - schema and data. If you need to
convince yourself, use the -s option to dump just the schema and examine
the output.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie