Clon servidor Liferay

Subscribe to Clon servidor Liferay 8 post(s), 3 voice(s)

 
Avatar alberto 9 post(s)

Buenos dias!

Estoy intentando hacer un clon del servidor que contiene el entorno Liferay.

Actualmente tengo un back-up del servidor en el que copio todo el directorio de la instalación (/opt/liferay-5.0.1), tambien he creado una máquina virtual con el mismo SO que el servidor (Red Hat).

La cuestión es:

¿He intentado copiar el directorio de instalación directamente en la máquina virtual, supongo que esto no ha funcionado porqué no tiene instalado el MySQL, ejecuto el script de arranque de servicios pero no hace nada?

¿Otra opción podría ser , realizar una nueva instalacion del paquete bitnami-liferay en la máquina virtual y substituir las carpetas “clave” que contienen los datos, como por ejemplo la carpeta “data”(/opt/liferay/mysql/data) ?

Gracias de antemano

 
Avatar beltran Administrator 392 post(s)

Hola Alberto,

Puedes hacer el clon fácilmente copiando todo el directorio de instalación en otra máquina (incluso no tiene por qué ser la misma distribución que donde la instalaste, vale cualquier distribución linux) pero siempre y cuando que la copies exactamente en el mismo directorio, es decir, copia /opt/liferay-5.0.1 a otra máquina en /opt/liferay-5.0.1. Eso te debe funcionar, yo lo he probado desde un Ubuntu a otras distribuciones sin problemas. Hay otras formas también de reproducirlo (backups, copiar mysql/data y otros ficheros, etc) pero son más complicados.

Espero que te sirva.

 
Avatar antonio Administrator 508 post(s)

Hola Alberto,

En principio, si copias la carpeta de instalación a la máquina virtual en la misma ruta, no debería haber problema. ¿Cuál es exactamente el problema? Recuerda, tiene que ser la misma ruta.

Un saludo

EDITO: Te me adelantaste Beltrán :)

 
Avatar alberto 9 post(s)

Muchas gracias chicos!!

Que velocidad!!

Pues la cuestión es que cuando intenté ejectuar el script ctlhscript que arranca los servicios, simplemente no hacía nada! yo lo asocié al hecho de que la máquina virtual no tenia instalado el paquete de bitnami y posiblemente Mysql no se estaba ejectuando por no estar instalado…

Bueno, voy a probarlo de nuevo como me decis y os cuento!

GRacias!!!!

 
Avatar alberto 9 post(s)

Buenos dias!

Este es el resultado que he obtenido despues de copiar de mi backup, del server original, el directorio en la máquina virtual. Los directorio de origen y destino son los mismos:

El problema es que Mysql no arranca, he comprobado los procesos y MySQL no esta arrancado…

Al ejecutar el servicio de MySQL unicamente

./ctlscript.sh start
mysql
Starting mysqld.bin daemon with databases from /opt/liferay-5.0.1-0/mysql/data

/opt/liferay-5.0.1-0/mysql/scripts/ctl.sh : mysql could not be started

STOPPING server from pid file /opt/liferay-5.0.1-0/mysql/data/pwdoc2.powerdataib.com.pid
080904 23:22:41 mysqld ended

Al ejecutar todos servicios: (Mysql y tomcat)

./ctlscript.sh start

Starting mysqld.bin daemon with databases from /opt/liferay-5.0.1-0/mysql/data

STOPPING server from pid file /opt/liferay-5.0.1-0/mysql/data/pwdoc2.powerdataib.com.pid

080904 23:31:04 mysqld ended

/opt/liferay-5.0.1-0/mysql/scripts/ctl.sh : mysql could not be started

Using CATALINA_BASE: /opt/liferay-5.0.1-0/apache-tomcat
Using CATALINA_HOME: /opt/liferay-5.0.1-0/apache-tomcat

Using CATALINA_TMPDIR: /opt/liferay-5.0.1-0/apache-tomcat/temp
Using JRE_HOME: /opt/liferay-5.0.1-0/java

/opt/liferay-5.0.1-0/apache-tomcat/scripts/ctl.sh : tomcat started

Alguna idea??

Gracias

 
Avatar beltran Administrator 392 post(s)

Hola Alberto,

¿puedes postear el log de mysql? Se encuentra en mysql/data/mysqld.log, quizás podamos descubir qué puede estar pasando.

 
Avatar alberto 9 post(s)

Este es el mysqld.log

080820 02:03:54 mysqld started
080820 2:03:55 InnoDB: Started; log sequence number 0 25886419
080820 2:03:55 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: ready for connections.
Version: ‘5.0.45’ socket: ’/opt/liferay-5.0.1-0/mysql/tmp/mysql.sock’ port: 3306 MySQL Community Server (GPL)
080821 2:00:12 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Normal shutdown

080821 2:00:12 InnoDB: Starting shutdown…
080821 2:00:16 InnoDB: Shutdown completed; log sequence number 0 25887274
080821 2:00:16 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Shutdown complete

080821 02:00:16 mysqld ended

080821 02:03:46 mysqld started
080821 2:03:47 InnoDB: Started; log sequence number 0 25887274
080821 2:03:47 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: ready for connections.
Version: ‘5.0.45’ socket: ’/opt/liferay-5.0.1-0/mysql/tmp/mysql.sock’ port: 3306 MySQL Community Server (GPL)
080822 2:00:10 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Normal shutdown

080822 2:00:10 InnoDB: Starting shutdown…
080822 2:00:13 InnoDB: Shutdown completed; log sequence number 0 25893472
080822 2:00:13 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Shutdown complete

080822 02:00:13 mysqld ended

080822 02:03:42 mysqld started
080822 2:03:42 InnoDB: Started; log sequence number 0 25893472
080822 2:03:42 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: ready for connections.
Version: ‘5.0.45’ socket: ’/opt/liferay-5.0.1-0/mysql/tmp/mysql.sock’ port: 3306 MySQL Community Server (GPL)
080822 11:26:16 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Normal shutdown

080822 11:26:16 InnoDB: Starting shutdown…
080822 11:26:18 InnoDB: Shutdown completed; log sequence number 0 25901184
080822 11:26:18 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Shutdown complete

080822 11:26:18 mysqld ended

080822 11:35:36 mysqld started
080822 11:35:36 InnoDB: Started; log sequence number 0 25901184
080822 11:35:36 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: ready for connections.
Version: ‘5.0.45’ socket: ’/opt/liferay-5.0.1-0/mysql/tmp/mysql.sock’ port: 3306 MySQL Community Server (GPL)
080822 12:25:56 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Normal shutdown

080822 12:25:58 InnoDB: Starting shutdown…
080822 12:44:07 mysqld started
080822 12:44:07 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files…
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer…
080822 12:44:07 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 25902059.
InnoDB: Doing recovery: scanned up to log sequence number 0 25902059
080822 12:44:07 InnoDB: Started; log sequence number 0 25902059
080822 12:44:07 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: ready for connections.
Version: ‘5.0.45’ socket: ’/opt/liferay-5.0.1-0/mysql/tmp/mysql.sock’ port: 3306 MySQL Community Server (GPL)
080823 2:00:10 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Normal shutdown

080823 2:00:10 InnoDB: Starting shutdown…
080823 2:00:13 InnoDB: Shutdown completed; log sequence number 0 25902924
080823 2:00:13 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Shutdown complete

080823 02:00:13 mysqld ended

080823 02:03:01 mysqld started
080823 2:03:01 InnoDB: Started; log sequence number 0 25902924
080823 2:03:02 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: ready for connections.
Version: ‘5.0.45’ socket: ’/opt/liferay-5.0.1-0/mysql/tmp/mysql.sock’ port: 3306 MySQL Community Server (GPL)
080824 2:00:10 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Normal shutdown

080824 2:00:10 InnoDB: Starting shutdown…
080824 2:00:11 InnoDB: Shutdown completed; log sequence number 0 25903799
080824 2:00:11 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Shutdown complete

080824 02:00:11 mysqld ended

080824 02:03:06 mysqld started
080824 2:03:07 InnoDB: Started; log sequence number 0 25903799
080824 2:03:07 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: ready for connections.
Version: ‘5.0.45’ socket: ’/opt/liferay-5.0.1-0/mysql/tmp/mysql.sock’ port: 3306 MySQL Community Server (GPL)
080825 2:00:10 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Normal shutdown

080825 2:00:10 InnoDB: Starting shutdown…
080825 2:00:13 InnoDB: Shutdown completed; log sequence number 0 25904654
080825 2:00:13 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Shutdown complete

080825 02:00:13 mysqld ended

080825 02:03:06 mysqld started
080825 2:03:07 InnoDB: Started; log sequence number 0 25904654
080825 2:03:07 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: ready for connections.
Version: ‘5.0.45’ socket: ’/opt/liferay-5.0.1-0/mysql/tmp/mysql.sock’ port: 3306 MySQL Community Server (GPL)
080826 2:00:10 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Normal shutdown

080826 2:00:10 InnoDB: Starting shutdown…
080826 2:00:13 InnoDB: Shutdown completed; log sequence number 0 25912619
080826 2:00:13 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Shutdown complete

080826 02:00:13 mysqld ended

080826 02:03:14 mysqld started
080826 2:03:14 InnoDB: Started; log sequence number 0 25912619
080826 2:03:14 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: ready for connections.
Version: ‘5.0.45’ socket: ’/opt/liferay-5.0.1-0/mysql/tmp/mysql.sock’ port: 3306 MySQL Community Server (GPL)
080827 2:00:10 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Normal shutdown

080827 2:00:10 InnoDB: Starting shutdown…
080827 2:00:12 InnoDB: Shutdown completed; log sequence number 0 26174785
080827 2:00:12 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Shutdown complete

080827 02:00:12 mysqld ended

080827 02:03:18 mysqld started
080827 2:03:19 InnoDB: Started; log sequence number 0 26174785
080827 2:03:19 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: ready for connections.
Version: ‘5.0.45’ socket: ’/opt/liferay-5.0.1-0/mysql/tmp/mysql.sock’ port: 3306 MySQL Community Server (GPL)
080828 2:00:10 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Normal shutdown

080828 2:00:10 InnoDB: Starting shutdown…
080828 2:00:13 InnoDB: Shutdown completed; log sequence number 0 26309171
080828 2:00:13 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Shutdown complete

080828 02:00:13 mysqld ended

080828 02:03:10 mysqld started
080828 2:03:10 InnoDB: Started; log sequence number 0 26309171
080828 2:03:10 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: ready for connections.
Version: ‘5.0.45’ socket: ’/opt/liferay-5.0.1-0/mysql/tmp/mysql.sock’ port: 3306 MySQL Community Server (GPL)
080829 2:00:10 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Normal shutdown

080829 2:00:12 InnoDB: Starting shutdown…
080829 2:00:16 InnoDB: Shutdown completed; log sequence number 0 26325941
080829 2:00:16 [Note] /opt/liferay-5.0.1-0/mysql/bin/mysqld.bin: Shutdown complete

080829 02:00:16 mysqld ended

080903 13:30:05 mysqld started
080903 13:30:06 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: ‘create’.
InnoDB: Cannot continue operation.
080903 13:30:06 mysqld ended

080903 13:32:59 mysqld started
080903 13:33:00 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: ‘create’.
InnoDB: Cannot continue operation.
080903 13:33:00 mysqld ended

080903 13:41:16 mysqld started
080903 13:41:17 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: ‘create’.
InnoDB: Cannot continue operation.
080903 13:41:17 mysqld ended

080903 15:34:13 mysqld started
080903 15:34:16 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: ‘create’.
InnoDB: Cannot continue operation.
080903 15:34:16 mysqld ended

080903 15:34:37 mysqld started
080903 15:34:40 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: ‘create’.
InnoDB: Cannot continue operation.
080903 15:34:40 mysqld ended

080904 14:37:13 mysqld started
080904 14:37:15 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: ‘create’.
InnoDB: Cannot continue operation.
080904 14:37:15 mysqld ended

080904 23:22:37 mysqld started
080904 23:22:41 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: ‘create’.
InnoDB: Cannot continue operation.
080904 23:22:41 mysqld ended

080904 23:31:04 mysqld started
080904 23:31:04 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: ‘create’.
InnoDB: Cannot continue operation.
080904 23:31:04 mysqld ended

tiene pinta de permisos, no?? Puede ser que al copiar el directorio como root cambien los permisos de la carpetas en MySQL? en ese caso , en los permisos debería aparecer el user mysql con permisos. no?

 
Avatar beltran Administrator 392 post(s)

Exacto, tiene pinta de permisos. Asegúrate de que el directorio mysql tiene estos permisos:

drwxr-xr-x 11 root mysql 4096 2008-08-25 10:37 mysql

y que el directorio mysql/data tiene estos otros:

drwxr-x—- 5 mysql mysql 4096 2008-09-01 10:30 data