Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore

From: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
To: Andrus Moor <eetasoft(at)online(dot)ee>
Cc: <adrian(dot)klaver(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore
Date: 2010-12-16 18:27:35
Message-ID: BBB5E1B3-411C-4BC1-BC75-1E4D7B116713@solfertje.student.utwente.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 what you'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 works as expected.

Of course, the big drawback is that you need to write them first and that (as with all home-cooked software) there will be bugs 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!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2010-12-16 18:38:26 Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore
Previous Message Joshua D. Drake 2010-12-16 18:12:35 PgEast 2011: NYC CFP