Restore Database
Restore Database
От:
Burbello <burbello3000@yahoo.com.br>
Дата:
I need to test and create a procedure to restore
databases.
I followed the steps based on the site, but I couldn't
finish succesfully.
I did:
1. Put the database on Backup Mode and copy
datafiles.
/pg/bin/psql cresoldev -c "SELECT
pg_start_backup('/pg/backup/');"
tar -cvf /pg/backup/bk_base.tar /pg/data/base/*
/pg/bin/psql cresoldev -c "SELECT
pg_stop_backup();"
File .conf: archive_command = 'cp -i %p
/pg/backup/xlog/%f
Re: Restore Database
От:
"Aaron Bono" <postgresql@aranya.com>
Дата:
On 7/11/06, Burbello <burbello3000@yahoo.com.br> wrote:
Why not just use pg_dump?
See http://manual.intl.indoglobal.com/ch06s07.html - it's really easy. This is how we copy from production to testing and development and how we do nightly backups.
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
==================================================================
I need to test and create a procedure to restore
databases.
Why not just use pg_dump?
See http://manual.intl.indoglobal.com/ch06s07.html - it's really easy. This is how we copy from production to testing and development and how we do nightly backups.
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
==================================================================
Re: Restore Database
От:
Alexander Burbello <burbello3000@yahoo.com.br>
Дата:
Ok! Its a good tool, but for Production Database I think it is not recommended. Only using pg_dump for the second backup plain. Suppose that you backed up at 6:00am and at 9am happened a crash on the server. In this case, I would lost data between that time, 3 hours of information. For production databases, my plan is to do phisical backup including WAL. If a crash happen, I can restore the datafiles and recover applying the WAL logs until the last file was generated. As Oracle does in this type of crash. My doubt is that I am not getting apply the WAL files on recover stage. Any other suggestion? Thanks for your help Aaron Bono escreveu: > On 7/11/06, *Burbello* > wrote: > > I need to test and create a procedure to restore > databases. > > > Why not just use pg_dump? > > See http://manual.intl.indoglobal.com/ch06s07.html > - it's really easy. > This is how we copy from production to testing and development and how > we do nightly backups. > > > ================================================================== > Aaron Bono > Aranya Software Technologies, Inc. > http://www.aranya.com > ==================================================================
Re: Restore Database
От:
Scott Marlowe <smarlowe@g2switchworks.com>
Дата:
On Wed, 2006-07-12 at 15:04, Alexander Burbello wrote: > Ok! Its a good tool, but for Production Database I think it is not > recommended. > Only using pg_dump for the second backup plain. > Suppose that you backed up at 6:00am and at 9am happened a crash on the > server. > In this case, I would lost data between that time, 3 hours of information. > > For production databases, my plan is to do phisical backup including WAL. > If a crash happen, I can restore the datafiles and recover applying the > WAL logs until the last file was generated. > As Oracle does in this type of crash. > > My doubt is that I am not getting apply the WAL files on recover stage. > > Any other suggestion? You have read this section of the manual, right? http://www.postgresql.org/docs/8.1/interactive/backup-online.html
Re: Restore Database
От:
Alexander Burbello <burbello3000@yahoo.com.br>
Дата:
Yes! I followed exactly that page to do. Thanks Scott Marlowe escreveu: >On Wed, 2006-07-12 at 15:04, Alexander Burbello wrote: > > >>Ok! Its a good tool, but for Production Database I think it is not >>recommended. >>Only using pg_dump for the second backup plain. >>Suppose that you backed up at 6:00am and at 9am happened a crash on the >>server. >>In this case, I would lost data between that time, 3 hours of information. >> >>For production databases, my plan is to do phisical backup including WAL. >>If a crash happen, I can restore the datafiles and recover applying the >>WAL logs until the last file was generated. >>As Oracle does in this type of crash. >> >>My doubt is that I am not getting apply the WAL files on recover stage. >> >>Any other suggestion? >> >> > >You have read this section of the manual, right? > >http://www.postgresql.org/docs/8.1/interactive/backup-online.html > > > >---------------------------(end of broadcast)--------------------------- >TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > > >