Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Best practice followed for Liferay migration Jignesh Vachhani July 26, 2012 10:58 PM
RE: Best practice followed for Liferay migration Vitaliy Koshelenko July 26, 2012 5:39 AM
RE: Best practice followed for Liferay migration David H Nebinger July 26, 2012 6:40 AM
RE: Best practice followed for Liferay migration Jignesh Vachhani July 26, 2012 9:57 PM
RE: Best practice followed for Liferay migration Jay Patel July 27, 2012 1:06 PM
RE: Best practice followed for Liferay migration Jack Bakker August 9, 2012 8:41 PM
RE: Best practice followed for Liferay migration Jignesh Vachhani August 20, 2012 11:22 PM
RE: Best practice followed for Liferay migration Shilpa Malpani July 23, 2013 9:22 AM
RE: Best practice followed for Liferay migration David H Nebinger July 24, 2013 6:18 AM
RE: Best practice followed for Liferay migration Shilpa Malpani July 26, 2013 1:09 PM
RE: Best practice followed for Liferay migration David H Nebinger July 26, 2013 1:39 PM
RE: Best practice followed for Liferay migration Shilpa Malpani August 1, 2013 6:32 PM
RE: Best practice followed for Liferay migration Mustufa Rahi July 24, 2014 2:27 AM
RE: Best practice followed for Liferay migration David H Nebinger July 24, 2014 4:58 PM
RE: Best practice followed for Liferay migration Muhammad Ghufron August 21, 2014 12:34 AM
RE: Best practice followed for Liferay migration David H Nebinger August 21, 2014 5:34 AM
RE: Best practice followed for Liferay migration Vitaliy Koshelenko August 22, 2014 7:03 AM
RE: Best practice followed for Liferay migration David H Nebinger August 22, 2014 7:43 AM
RE: Best practice followed for Liferay migration Vitaliy Koshelenko August 22, 2014 8:18 AM
RE: Best practice followed for Liferay migration David H Nebinger August 22, 2014 8:39 AM
RE: Best practice followed for Liferay migration Vitaliy Koshelenko September 23, 2014 5:36 AM
RE: Best practice followed for Liferay migration David H Nebinger September 23, 2014 5:49 AM
RE: Best practice followed for Liferay migration Vitaliy Koshelenko September 23, 2014 6:00 AM
Jignesh Vachhani
Best practice followed for Liferay migration
July 26, 2012 10:58 PM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 780

Join Date: March 10, 2008

Recent Posts

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.
Vitaliy Koshelenko
RE: Best practice followed for Liferay migration
July 26, 2012 5:39 AM
Answer

Vitaliy Koshelenko

Rank: Regular Member

Posts: 222

Join Date: March 25, 2011

Recent Posts

Hi, Jignesh.

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

Regards, Vitaliy
David H Nebinger
RE: Best practice followed for Liferay migration
July 26, 2012 6:40 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7153

Join Date: September 1, 2006

Recent Posts

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.
Jignesh Vachhani
RE: Best practice followed for Liferay migration
July 26, 2012 9:57 PM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 780

Join Date: March 10, 2008

Recent Posts

Thanks David,

That's awesome information.
Guys, Still you can share your view if anyone have more experience.
Jay Patel
RE: Best practice followed for Liferay migration
July 27, 2012 1:06 PM
Answer

Jay Patel

Rank: Regular Member

Posts: 116

Join Date: February 23, 2010

Recent Posts

Thanks David for sharing this.

-Jay.
Jack Bakker
RE: Best practice followed for Liferay migration
August 9, 2012 8:41 PM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 613

Join Date: January 3, 2010

Recent Posts

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
Jignesh Vachhani
RE: Best practice followed for Liferay migration
August 20, 2012 11:22 PM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 780

Join Date: March 10, 2008

Recent Posts

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.
Shilpa Malpani
RE: Best practice followed for Liferay migration
July 23, 2013 9:22 AM
Answer

Shilpa Malpani

Rank: New Member

Posts: 23

Join Date: July 10, 2013

Recent Posts

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
David H Nebinger
RE: Best practice followed for Liferay migration
July 24, 2013 6:18 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7153

Join Date: September 1, 2006

Recent Posts

You should not be using a vanilla 6.1.1 GA2. Instead you should be downloading from lcepatchers.org.
Shilpa Malpani
RE: Best practice followed for Liferay migration
July 26, 2013 1:09 PM
Answer

Shilpa Malpani

Rank: New Member

Posts: 23

Join Date: July 10, 2013

Recent Posts

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
David H Nebinger
RE: Best practice followed for Liferay migration
July 26, 2013 1:39 PM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7153

Join Date: September 1, 2006

Recent Posts

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
RE: Best practice followed for Liferay migration
August 1, 2013 6:32 PM
Answer

Shilpa Malpani

Rank: New Member

Posts: 23

Join Date: July 10, 2013

Recent Posts

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
RE: Best practice followed for Liferay migration
July 24, 2014 2:27 AM
Answer

Mustufa Rahi

Rank: New Member

Posts: 3

Join Date: May 22, 2012

Recent Posts

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.
David H Nebinger
RE: Best practice followed for Liferay migration
July 24, 2014 4:58 PM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7153

Join Date: September 1, 2006

Recent Posts

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.
Muhammad Ghufron
RE: Best practice followed for Liferay migration
August 21, 2014 12:34 AM
Answer

Muhammad Ghufron

Rank: New Member

Posts: 12

Join Date: August 7, 2014

Recent Posts

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 :

1
202: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

1
2runSQL(
3                    "update DLFileEntry set mimeType = '" + mimeType +
4                        "' 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
David H Nebinger
RE: Best practice followed for Liferay migration
August 21, 2014 5:34 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7153

Join Date: September 1, 2006

Recent Posts

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.
Vitaliy Koshelenko
RE: Best practice followed for Liferay migration
August 22, 2014 7:03 AM
Answer

Vitaliy Koshelenko

Rank: Regular Member

Posts: 222

Join Date: March 25, 2011

Recent Posts

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
David H Nebinger
RE: Best practice followed for Liferay migration
August 22, 2014 7:43 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7153

Join Date: September 1, 2006

Recent Posts

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, ...
Vitaliy Koshelenko
RE: Best practice followed for Liferay migration
August 22, 2014 8:18 AM
Answer

Vitaliy Koshelenko

Rank: Regular Member

Posts: 222

Join Date: March 25, 2011

Recent Posts

Hi, David.

Thanks for recomendations, will keep in mind.

Vitaliy
David H Nebinger
RE: Best practice followed for Liferay migration
August 22, 2014 8:39 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7153

Join Date: September 1, 2006

Recent Posts

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.
Vitaliy Koshelenko
RE: Best practice followed for Liferay migration
September 23, 2014 5:36 AM
Answer

Vitaliy Koshelenko

Rank: Regular Member

Posts: 222

Join Date: March 25, 2011

Recent Posts

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
David H Nebinger
RE: Best practice followed for Liferay migration
September 23, 2014 5:49 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7153

Join Date: September 1, 2006

Recent Posts

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...
Vitaliy Koshelenko
RE: Best practice followed for Liferay migration
September 23, 2014 6:00 AM
Answer

Vitaliy Koshelenko

Rank: Regular Member

Posts: 222

Join Date: March 25, 2011

Recent Posts

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