El 16/05/2013 15:35, Craig James
escribió:
On Thu, May 16, 2013 at 11:04 AM, Oscar
Calderon <ocalderon@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Hi
everybody, this is my first message in this list. The
company where i work is bringing maintenance service
of PostgreSQL to another company, and currently they have
installed PostgreSQL 9.1.1, and they want to move to 9.3
version when it will come out. So, because the difference
of versions, and because it was installed by compiling it
(using source code), and because the 9.1.1 installation is
in a different directory than the default, they decided to
replace 9.1.1 version with 9.3 (no upgrade, but replace
it).
Currently,
they only have one database in production of 2.2 GB with
some procedures and triggers. So, my plan to execute this
database installation is the next:
- Install PostgreSQL 9.3 from postgresql repository (yum.postgresql.org)
with a different port to avoid interrupt the
production PostgreSQL instance operation
- Tune the database parameters in postgresql.conf,
also create the same rules in pg_hba as the production
instance, configure log and so on.
- At the end of the operations day, create a backup of
the production database and then restore it into the
new instance
- Test the new instance with the PHP applications that
use it and verify that all is in order
- Stop the old instance and change the port to another
port, then change the port of the new instance to 5432
in order to avoid change the network configuration,
permissions and so on.
But really is the first time that i do that, so i don't
know if i'm missing something or there's something wrong
about i'm planning to do, so i will appreciate very much
if you can guide me about what steps i have to do
exactly and considerations during this process.
I would expand step 4 into a much longer period. Say, do
steps 1..3 (you don't even have to stop your services ... do
it during a low-traffic period), then spend a few days on step
4 to ensure that all of your applications work and that you
don't have any queries that have problems. Unless your
application is really simple, it will take more than an hour
or two to ensure that the migration will go well.
Once you're convinced that everything will work, discard the
new 9.3 database and start over again at step 1, and this time
complete through step 5.
Craig
OK, first of all, excuse my English.
It is know that in the step 3 you must do the backup with pg_dump of
the new instance (pg 9.3) and restore it with the same version.
|