Fórum

Best practice followed for Liferay migration

thumbnail
Jignesh Vachhani, modificado 11 Anos atrás.

Best practice followed for Liferay migration

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
Hi Everyone,

Please share your experience and knowledge which have been faced during Liferay(for any version) migration.
Share any documents,links or any risks related information here which would help a lot to community members.
thumbnail
Vitaliy Koshelenko, modificado 11 Anos atrás.

RE: Best practice followed for Liferay migration

Expert Postagens: 319 Data de Entrada: 25/03/11 Postagens Recentes
Hi, Jignesh.

I have posted related topic: http://www.liferay.com/community/forums/-/message_boards/message/14983029
There are some useful links.

Regards, Vitaliy
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: Best practice followed for Liferay migration (Resposta)

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Jignesh Vachhani:
Hi Everyone,

Please share your experience and knowledge which have been faced during Liferay(for any version) migration.
Share any documents,links or any risks related information here which would help a lot to community members.


1. Back up all data, including the database and the data directory. Liferay should not be running when you do this. You will need these backups should the upgrade process fail for some reason and you need to start over.

2. DO NOT START LIFERAY (UPGRADE) UNTIL FOLLOWING STEPS ARE COMPLETED.

3. Get the version of Liferay you will be using and get it ready (but do not start it). Prepare the portal-ext.properties file (if going to 6.1, disable the new instance wizard). This should be a clean instance of Liferay (remove the 7cogs stuff, should have no plugins deployed at all), BUT DO NOT CHANGE THE DATABASE FROM THE HSQL DEFAULT, AND USE A TEMPORARY DATA DIRECTORY (NOT THE ONE THAT YOU'RE PLANNING TO UPGRADE).

4. If you've done any plugin deployment to the previous version, download the SDK for the version you are targeting. Configure the SDK to point to the Liferay instance you're deploying to.

5. Do clean builds/deploys of your plugins. Themes should be updated to match the version of Liferay you'll be using (in liferay-look-and-feel.xml). Portlets, hooks, and EXT should be compiled w/o errors (errors indicate a change in API w/ the newer version that you should resolve before starting Liferay the first time). Personally I'd recommend excluding any plugins that do not have a direct effect on the Liferay core (i.e. a simple portlet plugin that uses it's own entities and does not touch the Liferay stuff) as this will just complicate the upgrade. If a code change does directly affect the core (i.e. you have your own auto-login process), these should be deployed as there may be database dependencies that need to be resolved at startup.

6. At this point you have the version of Liferay ready, you have all of your plugins in the deploy folder, and Liferay is pointed at the HSQL database. Start up application container. Let Liferay create the HSQL database and handle the deployment of all of your plugins. Restart Liferay after the deployments are all done. Make sure there are no startup issues reported. Log into Liferay and spin around, ensuring that all pieces are working correctly (test out your theme(s), your hook(s), your EXT). Make any necessary fixes in the plugins and re-deploy them. Repeat until you get a clean startup and all plugins are functioning appropriately.

7. At this point your Liferay should be ready to go; all plugins are working, themes are ready, etc. All code appears functional and working (although the database is incomplete). Change the portal-ext.properties file to point to your database and your real data directory.

8. Start up Liferay. Watch the console for any issues. Be prepared to wait if you have a large number of users, documents, pages, whatever, especially when there are underlying database changes that must be upgraded (i.e. from 6.0 to 6.1). Failure in the upgrade process will probably require restoring the database AND the data directory. As failures occur, shut down Liferay and do the restores. Make any necessary changes (i.e. clean up missing documents, whatever) and start the upgrade process again.

9. Deploy any other plugins that have been waiting in the wings (the ones that did not directly effect the Liferay core).

10. Test, test, test. Resolve any issues w/ themes, hooks, portlets, etc.

Other recommendations:

1. Do not run on the bleeding edge of Liferay releases. 6.0 in it's first GA release was not ready for production, and it wasn't really ready until GA4. 6.1's first release is also not ready. Folks upgrading systems to 6.1 GA1 were basically beta testers. Responsible software configuration managers will not allow the initial GA releases into their production environments, they will wait until later GA releases that are more stable and bug-free.
thumbnail
Jignesh Vachhani, modificado 11 Anos atrás.

RE: Best practice followed for Liferay migration

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
Thanks David,

That's awesome information.
Guys, Still you can share your view if anyone have more experience.
thumbnail
Jay Patel, modificado 11 Anos atrás.

RE: Best practice followed for Liferay migration

Regular Member Postagens: 118 Data de Entrada: 24/02/10 Postagens Recentes
Thanks David for sharing this.

-Jay.
thumbnail
Jack Bakker, modificado 11 Anos atrás.

RE: Best practice followed for Liferay migration

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
be cool if there was a forum 'hot list' organized/tagged by subject ; could bring better attention to some really useful posts like David's here
thumbnail
Jignesh Vachhani, modificado 11 Anos atrás.

RE: Best practice followed for Liferay migration

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
Hi Jack,

You are absolutely right.
In our last Lferay group meetup , we proposed this things to liferay.
So better we would have separate category for this point as many people faced difficulties during migration.
And they can put their views as one place.
thumbnail
Subhasis Roy, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

Expert Postagens: 275 Data de Entrada: 20/01/12 Postagens Recentes
Really nice once
Shilpa Malpani, modificado 10 Anos atrás.

RE: Best practice followed for Liferay migration

New Member Postagens: 23 Data de Entrada: 10/07/13 Postagens Recentes
Jignesh Vachhani:
Hi Everyone,

Please share your experience and knowledge which have been faced during Liferay(for any version) migration.
Share any documents,links or any risks related information here which would help a lot to community members.



Hello all,

Thanks for sharing the steps for upgrade.Its of great help
.
I'm upgrading from Liferay6.0.5 to Liferay6.1.1ceGA2. I started with the completely fresh latest download.Just defined new jdbc connection in portal-ext pointing to the old database(LR 6.0.5) and started the server.i have been able to upgrade this minimial configuration.

I noticed ,while upgrading ,one of the few things that upgrade process does is check the value from the "state" column in the release table .This is to verify that previous upgrade has been in good state or not. Then there is an exception stating "state_ identifier missing".(DBUpgrader._checkReleaseState())

While going through the previous liferay -sqls, I found that its been newly added in 6.1.1ga2.Previously, the column was not there in the "Release" table. So I manually added the column and then the minimial upgrade went smooth.
This might be a minor problem as I dint see the mention of this earlier. If there is any other solution apart from this please do let me know.

Thanks,
Shilpa
thumbnail
David H Nebinger, modificado 10 Anos atrás.

RE: Best practice followed for Liferay migration

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
You should not be using a vanilla 6.1.1 GA2. Instead you should be downloading from lcepatchers.org.
Shilpa Malpani, modificado 10 Anos atrás.

RE: Best practice followed for Liferay migration

New Member Postagens: 23 Data de Entrada: 10/07/13 Postagens Recentes
David H Nebinger:
You should not be using a vanilla 6.1.1 GA2. Instead you should be downloading from lcepatchers.org.


Ok.Thanks for that.i'll do that.
I dint find liferay 6.1.1ga2 bundled with glassfish server .Do I need to load the server and liferaywar/dependencies files separately?

Thanks
thumbnail
David H Nebinger, modificado 10 Anos atrás.

RE: Best practice followed for Liferay migration

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
I'd start w/ the official 6.1.1 GA2 bundle w/ glassfish as it will have everything configured, then replace files from the lcepatchers.org download...
Shilpa Malpani, modificado 10 Anos atrás.

RE: Best practice followed for Liferay migration

New Member Postagens: 23 Data de Entrada: 10/07/13 Postagens Recentes
Thanks David!!

I downloaded from LCEPatcher.org and thing work fine now.i don't need to add column "state" in the Release_ table manually anymore.
its of great help to novice in Liferay like me.

-Shilpa
Mustufa Rahi, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

New Member Postagens: 2 Data de Entrada: 22/05/12 Postagens Recentes
To migrate liferay 6.0.6 to liferay 6.2 we need to follow below steps.


Step 1. First we need to migrate liferay-6.0.6 to liferay-6.1.


Create 6.0.6 Database dump like (attune.sql).
Create database for liferay-6.1 (attune6.1).
Load liferay-6.0.6 dump into liferay-6.1 database for this use below command
mysql -uroot -p1 attune6.1 < attune.sql;
Download and Unzip clean Liferay 6.1.
Start Liferay-6.1 with default Hypersonic database settings.
Shutdown or stop Liferay 6.1.
Now copy 'data' folder from Liferay-6.0.6 to Liferay-6.1.0.
Create one portal-ext.properties in class folder and pest below contents:



jdbc.default.driverClassName=com.mysql.jdbc.Driver

jdbc.default.url=jdbc:mysql://localhost:3306/ attune6.1?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root

dl.hook.impl=com.liferay.documentlibrary.util.AdvancedFileSystemHook
dl.store.impl=com.liferay.portlet.documentlibrary.store.AdvancedFileSystemStore

9. Now start Liferay-6.1. and wait until liferay's upgrade process has upgraded database to 6.1.


Step 2. Now migratie liferay6.1 to liferay-6.2.


Create dump of liferay6.1 (attune1.sql).
Create new database for liferay-6.2 (attune6.2).
Load liferay-6.1 dump into liferay-6.2 database for this use below command:
mysql -uroot -p1 attune6.2 < ttune1.sql;
New download and unzip clean Liferay-6.2.
Start Liferay-6.2 with default Hypersonic database settings.
Shutdown or stop Liferay 6.2.
Now copy 'data' folder from Liferay-6.1.0 to Liferay-6.2.0.
Modify portal-setup-wizard.properties file, add db configuration:

jdbc.default.driverClassName=com.mysql.jdbc.Driver

jdbc.default.url=jdbc:mysql://localhost:3306/ attune6.2?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root

dl.hook.impl=com.liferay.documentlibrary.util.AdvancedFileSystemHook
dl.store.impl=com.liferay.portlet.documentlibrary.store.AdvancedFileSystemStore
passwords.encryption.algorithm.legacy=SHA

9. Start Liferay-6.2. Wait until liferay upgrade process has upgraded database to liferay-6.2.
thumbnail
David H Nebinger, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Mustufa Rahi:
To migrate liferay 6.0.6 to liferay 6.2 we need to follow below steps.


Totally wrong. You do not have to step from 6.0 to 6.1 to 6.2. You can go from 6.0 to 6.2 in one step, as long as you understand what you have to do to prepare for the migration.

Create 6.0.6 Database dump like (attune.sql).
Create database for liferay-6.1 (attune6.1).
Load liferay-6.0.6 dump into liferay-6.1 database for this use below command
mysql -uroot -p1 attune6.1 < attune.sql;
Download and Unzip clean Liferay 6.1.
Start Liferay-6.1 with default Hypersonic database settings.
Shutdown or stop Liferay 6.1.
Now copy 'data' folder from Liferay-6.0.6 to Liferay-6.1.0.
Create one portal-ext.properties in class folder and pest below contents:


Again totally wrong. Database backup yes, but that's only to restore the database back in case of upgrade failure. Otherwise it is just fine to point 6.1 (or 6.2) at your current database and data folder and fire it up.

Oh, and you don't need a separate data folder for 6.0 and 6.1 (or 6.2). You want a backup (same as database) for restore if necessary, but otherwise 6.1 (or 6.2) will update in place.

And the whole hypersonic thing is also just wrong. You're just doing that to initialize the data folder which you're overwriting anyway, so it's really a whole wasted step.

And portal-ext.properties should not be in the classes folder, it should be in LIFERAY_HOME which is where the data directory is created, usually the folder that contains the tomcat folder.

And you didn't mention about disabling the startup wizard in portal-ext.properties.

jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3306/ attune6.1?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root


Seriously? Your password for your database is 'root'? If that's the case, then someone would be foolish to follow your suggestion lest they be just as vulnerable as your site is.

Step 2. Now migratie liferay6.1 to liferay-6.2.


I won't go in to it other than saying you've duplicated all of the work all over again. So you're going to look busy if your boss walks by, but you accomplish nothing at all really.

Now let's cover some of the stuff that you didn't mention (and likely didn't do):

1. You didn't talk about the permissions algorithm. If you're not using algorithm 6, you really must update it before starting. This is best handled in 6.0 before doing the other upgrades as it takes it out as a possible failure point when handling the upgrades.

2. The image gallery is gone in 6.2, and there are steps you need to take during the upgrade so the image gallery gets converted into Docs and Media in 6.2.

And it's important to point out that you should always be using the latest available GA when upgrading. The latest GA has many bugfixes, including those that are part of the upgrade process.
thumbnail
Muhammad Ghufron, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

New Member Postagens: 18 Data de Entrada: 08/08/14 Postagens Recentes
Hi David H Nebinger thanks for a great explanation,

now i'm trying to upgrade liferay from 6.0 to 6.2 with large size existing database,
i have a problem when startup tomcat in this part :


02:56:17,920 INFO  [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeDocumentLibrary

these process takes a very long time, and when i trying to investigated from source code (UpgradeDocumentLibrary.java), i see that liferay doing
some update to DLFileEntry table


runSQL(
					"update DLFileEntry set mimeType = '" + mimeType +
						"' where fileEntryId = " + fileEntryId);


i knew that i have 340.000 record in DLFileEntry table, so it will take long time,
do you have solution for this case ?

Thank you very much
thumbnail
David H Nebinger, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Nope, it is what it is. Liferay is going through all of your docs to include the mime type in the db (provides a number of useful things to Liferay when it knows the mime type before opening the doc).

It's simply going to take awhile considering the size of your doc lib.
thumbnail
Vitaliy Koshelenko, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

Expert Postagens: 319 Data de Entrada: 25/03/11 Postagens Recentes
Hi, all!

I'm currently working with Liferay migration from 5.2.3 to 6.2
Here is my blog about step-by-step migration:
http://vetal-liferay.blogspot.com/2014/01/liferay-migration-form-523-to-62.html

Vitaliy
thumbnail
David H Nebinger, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Hey, Vitally.

Before step 6, you should also have copied the data directory from 5.2.3 to 6.0.6. The database is not all there is to Liferay, there's also the doc lib, etc.

Also, there's no reason to stop at 6.0.6. You can combine the 6.0.6 and 6.1 steps since 6.1 is still aware of the older permissions model.

I like step 4 - Portlets and Themes Migration, with only two steps inside. Makes it seem so easy. Fun part is, of course, all of the API changes, the tag changes, the whole jquery -> aui javascript changes, ...
thumbnail
Vitaliy Koshelenko, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

Expert Postagens: 319 Data de Entrada: 25/03/11 Postagens Recentes
Hi, David.

Thanks for recomendations, will keep in mind.

Vitaliy
thumbnail
David H Nebinger, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Yep, many times people believe they have to stop at every significant Liferay version, but that's normally not the case.

The only issue is the permissions algorithm; you need to be at 6 for Liferay 6.2, once you are you can get directly to 6.2.
thumbnail
Vitaliy Koshelenko, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

Expert Postagens: 319 Data de Entrada: 25/03/11 Postagens Recentes
Hi again,

I have problems after migration from 5.2.3 to 6.2.
All images (that were in Image Gallery) have been migrated into Document and Media.
But we have a lot of Wiki pages and WebContent, which use URLs from Image Gallery, like:

http://host:port/image/image_gallery?uuid=8993731d-7a1c-49e2-9f2a-7db0400c0257&groupId=28681

The problem is that admin user does see those images (in WebContent, Wiki, etc.), but ordinary user can not doesn't see them (actually, he sees some images, and doesn't sees some others). I suppose, there is something wrong with permissions.

However, document-based URL, like:

http://host:port/documents/28681/35067/Dealer+UDB+Process+Overview/8993731d-7a1c-49e2-9f2a-7db0400c0257

is accessible both for admins and simple users.

How can I fix this issue? (without manual editing all the content, or checking all the necessary images/folders/permissions, etc.). Maybe there are some additional options during migration...
Please, help emoticon

Regards, Vitaly
thumbnail
David H Nebinger, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
It would be a permission issue, and probably one served by a sql update, I'm just not sure what it would take to get you there...

There's nothing magical in the upgrade that would allow you to change perms, the upgrade is supposed to keep what you had before...

That said, I guess if they added, removed, or broke apart permissions from 5.2.3 along the way the upgrade may be doing it's best to make up for it but falling short.

Have you checked Jira to see if maybe it was a known issue that's been resolved? If it has been resolved, you may be able to apply the appropriate patch in order to get it working right...

Oh, and since you're upgrading to 6.1 before jumping to 6.2, the version of 6.1 coming from lcepatchers.org had all fixes applied to it and was often much better than liferay's GA as a result...
thumbnail
Vitaliy Koshelenko, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

Expert Postagens: 319 Data de Entrada: 25/03/11 Postagens Recentes
Hey David,

Thanks for reply.
I'll check the permissions issues (however, as I checked - user has permission to access the folder and the image inside folder, which I check, and he can also access this image through document-based URL). I'll also check LPS tickets. For now another question here - is there a way in Liferay to convert IG-based URLs, like:

http://host:port/image/image_gallery?uuid=8993731d-7a1c-49e2-9f2a-7db0400c0257&groupId=28681

to document-based, like:

http://host:port/documents/28681/35067/Dealer+UDB+Process+Overview/8993731d-7a1c-49e2-9f2a-7db0400c0257

?

I suppose, if I change all the URLs inside Wiki/WebContent - issues should be fixed.

Vitaliy
Sergio Contreras, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

New Member Postagens: 2 Data de Entrada: 28/12/14 Postagens Recentes
Hello, I need help! Ideas or experience from you will be useful! thx in advance.

We've got 6.0.5 Liferay Version and all the contents are in DB, now we are planning to migrate to 6.2 and we want to have the content in Filesystem. Any idea, procedure, guide or similar experience?

BR,
SAC
thumbnail
Jitendra Rajput, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

Liferay Master Postagens: 875 Data de Entrada: 07/01/11 Postagens Recentes
Yes , You can change the document library hook from Database to FileSystem or Advance File System.

In 6.05 Images and Document Library were separate component from 6.1 onward they are merged into Document Library.

At the time of database up gradation you can change dl hook in the portal-ext of Liferay 6.2

 dl.store.impl=com.liferay.portlet.documentlibrary.store.FileSystemStore



One more way is that you can first migrate the content in Liferay 6.0.5 from Database to File System using component available under server administration --> Data migration.

Once your contents are migrated from Database to File System after that you can start Liferay 6.2 upgrade.

Thank you,
Jitendra
Sergio Bastos, modificado 9 Anos atrás.

RE: Best practice followed for Liferay migration

New Member Postagens: 2 Data de Entrada: 28/12/14 Postagens Recentes
Hi Jitendra,

Thank you for the answer. Regarding the second way, what do you think about migrate DB to DB a then in 6.2 migrate to File system, it was another recommendation we received?

Is there a preferred way among them?

BR,
SAC