Autor Tema: Pasar la base de produccion que esta 2.3.X a un ambiente 3.0.0 ya instalado  (Leído 147 veces)

0 Usuarios y 1 Visitante están viendo este tema.

seula

  • Newbie
  • *
  • Mensajes: 20
    • Ver Perfil
    • Email
  • Institución: Rectorado Universidad Nacional de Cuyo
  • Nombre y apellido: Jorge Sebastian Eula Dalmau
  • Sistema: Toba, Mapuche
  • Teléfono laboral: 0261 - 4494200
Solo me queda una duda, todo esto lo hice sobre un servidor de pruebas, con la base actualizada a hoy. La semana que viene vamos a correr una simulación de cierre anual sobre este servidor de prueba, el tema es que la semana que viene voy a necesitar la base de datos actualizada, si copio la base de datos actual (2.3.7) no va a tener la actualización que se hace durante la instalación de la nueva versión.
Hay forma de copiar la base y correr los scrips de actualización a la ultima versión sin tener que volver a instalar pilaga completo?

Gracias!


« Última Modificación: diciembre 19, 2016, 12:06:55 pm por jferrari »

jferrari

  • Moderador Global
  • *****
  • Mensajes: 39
    • Ver Perfil
    • Email
Re:Pasar la base de produccion que esta 2.3.X a un ambiente 3.0.0 ya instalado
« Respuesta #1 : diciembre 19, 2016, 04:13:34 pm »
Hola Seba,

Para pasar una base 2.3.X (AMBIENTE A) a una versión 3.0.0 previamente instalada en otro ambiente (AMBIENTE B) .

1- Deben hacer un dump de la base 2.3.X para res guardarla.

pg_dump –h [host] –U [username] <data_base_pilaga> > base_pilaga23X.dump

2- Aplicarle el script de conversión de la version 3.0.0 que se encuentra en:

../SIU-Pilaga/sql/conversion/script_3.0.0.sql

psql –h [host] –U [username] <data_base_pilaga> < /SIU-Pilaga/sql/conversion/script_3.0.0.sql

de esta forma la base de pilaga del AMBIENTE A ahora esta en 3.0.0.

3- Para que funcione solo resta verificar que los metadatos de toba sean los correcto para SIU-Pilaga 3.0.0.

3-1- Si la instalación de la versión SIU-Pilagá 3.0.0 en el AMBIENTE B es para DESARROLLO:

    Si la base de Toba y Pilaga se encuentran en distintas bases de datos:

   Seguir con el punto 4.

   Para Instalaciones de Toba y Pilaga en una única bases de datos:

   Entonces dentro de la base de Pilaga 3.0.0 del AMBIENTE B existen dos esquemas que se llaman desarrollo y desarrollo_logs:
   
         Realizar un dump de estos dos esquemas, ej:

   pg_dump –h [host] –U [username] -n desarrollo_logs -n desarrollo [data_base_pilaga3.0.0] > dump_dos_esquemas_300.sql

   y subirlos a la base pilaga convertida en el punto 2, ej:

   psql –h [host] –U [username] [data_base_pilagaANTERIOR] < dump_dos_esquemas_300.sql

3-2- Si la version 3.0.0 instalada del AMBIENTE B es de producción, la base de pilaga y de toba se encuentran en una misma base.

   Realizar un dump de estos dos esquemas , ej:
   pg_dump –h [host] –U [username] -n toba_pilaga_logs -n toba_pilaga [data_base_pilaga3.0.0] > dump_dos_esquemas_300.sql

   *y subirlos a la base pilaga convertida en el punto 2, para esto se puede hacer lo siguiente:
   
   primero ejecutar estas sentencias con un cliente de postgres:
   DROP SCHEMA toba_pilaga_logs;
   DROP SCHEMA toba_pilaga;

   una vez eliminados los esquemas, subir el dump dump_dos_esquemas_300.sql de los dos esquemas a la base convertida en el punto 2:
   psql –h [host] –U [username] [data_base_pilagaANTERIOR] < dump_dos_esquemas_300.sql

4 - Por ultimo:

   Modificar en el bases.ini del AMBIENTE B dentro de "SIU-Pilaga/instalacion/bases.ini" para que apunte a la base
   pilaga que se convirtió del AMBIENTE A  a la versión 3.0.0.
« Última Modificación: diciembre 19, 2016, 04:20:28 pm por jferrari »

seula

  • Newbie
  • *
  • Mensajes: 20
    • Ver Perfil
    • Email
  • Institución: Rectorado Universidad Nacional de Cuyo
  • Nombre y apellido: Jorge Sebastian Eula Dalmau
  • Sistema: Toba, Mapuche
  • Teléfono laboral: 0261 - 4494200
Re:Pasar la base de produccion que esta 2.3.X a un ambiente 3.0.0 ya instalado
« Respuesta #2 : diciembre 20, 2016, 10:25:03 am »
Excelente muchas gracias hora lo pruebo y cualquier cosa les comento.

Un abrazo.

pbarbozasaba

  • Newbie
  • *
  • Mensajes: 10
    • Ver Perfil
  • Institución: Fundación Miguel Lillo
  • Nombre y apellido: Pablo Javier Barboza Sabá
  • Sistema: Pilaga
  • Teléfono laboral: 3814330468
Buenos Dias, estoy  teniendo inconvenientes para convertir la Base de datos 2.3.5 a 3.0.0.

 Genere el archivo pilaga.dump del ambiente 2.3.5 y lo cargue en el ambiente 3.0.0. con esta sentencia

"postgres@server:~$ psql -U postgres -f /home/pablo-b/Pilaga235_2016.dump"

y por consola me mostro esto

ALTER TABLE
ALTER TABLE
ALTER TABLE
...
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
SET
ALTER TABLE
ALTER TABLE
ALTER TABLE
REVOKE
REVOKE
GRANT
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT
REVOKE
REVOKE
GRANT

a simple vista parece que todo esta bien, luego de esto voy a convertir esta base de datos Pilaga_2016

" psql -U postgres Pilaga_2016 < /home/pablo-b/SIU-Pilaga-3.0.0/sql/conversion/script_3.0.0.sql"

me devuelve:

n block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xed 0x27 0x0d
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xe1 0x6e 0x65
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xed 0x61 0x20
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xed 0x20 0x70
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xf3 0x6e 0x20 0x41
ERROR:  invalid byte sequence for encoding "UTF8": 0xf3 0x6e 0x2e 0x27
ERROR:  invalid byte sequence for encoding "UTF8": 0xfa
ERROR:  invalid byte sequence for encoding "UTF8": 0xe1 0x2e 0x27
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xf3 0x6e 0x20 0x41
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xf3 0x6e 0x27 0x0d
ERROR:  invalid byte sequence for encoding "UTF8": 0xf3 0x6e 0x27 0x0d
ERROR:  invalid byte sequence for encoding "UTF8": 0xf3 0x6e 0x27 0x0d
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xf3 0x6e 0x20 0x25
ERROR:  invalid byte sequence for encoding "UTF8": 0xf3 0x6e 0x20 0x65
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xf1 0x6f 0x73 0x20
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xf1 0x6f 0x20 0x64
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xfa
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xe1 0x20 0x69
ERROR:  invalid byte sequence for encoding "UTF8": 0xf3 0x64 0x75 0x6c
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xe1 0x6d 0x69
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xe1 0x6c 0x69
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xfa
ERROR:  invalid byte sequence for encoding "UTF8": 0xe1 0x6c 0x69
ERROR:  invalid byte sequence for encoding "UTF8": 0xf1 0x6f 0x20 0x64
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xd3 0x4e
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ERROR:  invalid byte sequence for encoding "UTF8": 0xd1 0x4f
...
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ROLLBACK

Agradeceria que me puedan ayudar
Saludos


 

Comunidad SIU