Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore - Mailing list pgsql-general

From Alban Hertroys
Subject Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore
Date
Msg-id BBB5E1B3-411C-4BC1-BC75-1E4D7B116713@solfertje.student.utwente.nl
Whole thread Raw
In response to Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore  ("Andrus Moor" <eetasoft@online.ee>)
List pgsql-general
On 16 Dec 2010, at 9:16, Andrus Moor wrote:

> How to fix this without distributing two copies of pg_dump/pg_restore ?
> Is it reasonable to create database and plpgsql language manually before running pg_restore ? In

Are you sure that restoring dumps to your customers' sites is the best approach to install your software (if that's
whatyou're doing)? 

Most people seem to write scripts to install databases for their products, which has a few benefits:
- You can put those scripts under version control.
- You can write them in such a way that you can do incremental updates of a database corresponding to version X of your
product,to version Y or Z of your product. With pg_dump/restore you can only restore an entire database at a time. 
- You don't need to rely on the availability or installation location of pg_dump/pg_restore at your customer's site.
- You are much more flexible in what data gets inserted into your database and how that happens.
- It's easy to extend those scripts with, for example, some simple unit-tests to verify that your database on site
worksas expected. 

Of course, the big drawback is that you need to write them first and that (as with all home-cooked software) there will
bebugs in them. 

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:737,4d0a5a32802651802549062!



pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: PgEast 2011: NYC CFP
Next
From: Adrian Klaver
Date:
Subject: Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore