Foren

Migrating From Liferay Server

thumbnail
James Stuart Milne, geändert vor 9 Jahren.

Migrating From Liferay Server

New Member Beiträge: 11 Beitrittsdatum: 23.02.10 Neueste Beiträge
Hi im a Liferay user since version 5.3. And always worked the same way with liferay.:
If I was to build a portal I would develop the whole thing in my computer or vm, and then when i had to put my work on a different machine i would follow this simple steps :

https://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/backing-up-a-liferay-installati-5

And deploy liferay on a different computer.

Now amazed by the changes in liferay 6.2. it seems I cant do that.

When I restore the database in a different machine (i mean my host computer name etc are different), I dont see the same instalation, it does not work:

I can login, every existing user logs in perfectly.

But every web page except welcome gives a resource not found error. I Think you all know the error im talking about. The red NOT Found with a :

the resource was not found
http://localhost:8080/group/control_panel?refererPlid=13310

Usually in previous versions when i got this error I would go to control panel and reindex, and then everything would go smothly as if i had never migrated servers, however i cant go in to control panel anymore. nor any other administration page.

What i tried was setting a new liferay instalation with the backed up bundle(new database), and the liferay looks like it has no issues.
On a new install everything works perfectly.
So that kind of narrowed the problem to the db, but i cant find what the problem is, no errors are thrown during the database restore, so the db is not corrupt. In fact I run the pg_dump more than once and still the same problem.

Any ideas or advice?


Im using a liferay liferay-portal-6.2-ce-ga2 tomcat budle
postgress database 9.3
java8
thumbnail
David H Nebinger, geändert vor 9 Jahren.

RE: Migrating From Liferay Server

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
you could try deleting the indices and see if they rebuild at startup (no indices may trigger it, but not sure).

Personally I recommend development of plugins only on your local environment. Content, on the other hand, should be developed on the prod server.

Most of the time I think most people have issues trying to move content between environments, especially if they want to try a 'merge' into an existing environment, it's just too easy to get critical key values out of sync.

The LAR exports are supposed to be a way to export/import content, so this may be an alternate path for you to consider.
thumbnail
James Stuart Milne, geändert vor 9 Jahren.

RE: Migrating From Liferay Server

New Member Beiträge: 11 Beitrittsdatum: 23.02.10 Neueste Beiträge
Thank you for the quick response.

I did try that "rm -rf *" on the data directory. but i had the same errors.
thumbnail
David H Nebinger, geändert vor 9 Jahren.

RE: Migrating From Liferay Server

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
rm rf on the data directory will destroy all of your filesystem assets, not just the indices...
thumbnail
James Stuart Milne, geändert vor 9 Jahren.

RE: Migrating From Liferay Server

New Member Beiträge: 11 Beitrittsdatum: 23.02.10 Neueste Beiträge
Yes i knew i was deleting more than i wanted to, but since i had nothing on my document library didn't really care i just wanted to see if that solved the problem, i need to hand this in and i dont want to write every web content, user ,organization... etc again.

I just tried deleting only lucene directory and the problem persist. I also tried changing the virtual machine name setting under the configuration options in control panel to 'localhost' and making the backup again. didnt work either.

Im pasting my backup script :


SYNC_FOLDER=/home/jimmy/Liferays/currentLiferay/

ssh root@somehost.com << 'EOF'
cd /opt/backup
rm *
echo "Stopping Liferay..."
/opt/liferay/tomcat-7.0.42/bin/shutdown.sh

echo "Backup sql script"
su postgres -c "pg_dump liferay_db > liferay_db.sql"
cp /opt/backup/liferay_db.sql /opt/liferay/
EOF
echo "Pre- Operations Done. Proceeding with sync in $SYNC_FOLDER ill need the password of ssh again"

rsync -av --delete --progress root@somehost.com:/opt/liferay $SYNC_FOLDER



I run this script with liferay already down so the "maybe liferay was not down yet is not an option either"

to restore my database i run :
psql -d liferay_db -U dbuser -f /vagrant/liferay_db.sql

Still no luck
thumbnail
James Stuart Milne, geändert vor 9 Jahren.

SOLVED: Migrating From Liferay Server

New Member Beiträge: 11 Beitrittsdatum: 23.02.10 Neueste Beiträge
Hi Found the solution.

It seems my database encodings were different. on the local machine it was not UTF-8 and the export was UTF-8 so i created my database with

create database liferay_db with owner postgres encoding='UTF-8'
lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;

And imported the database back and everything worked fine emoticon hope it helps somebody