Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Morad Ahmad
Best practice to move Websites from local maschine to remote
August 21, 2012 4:01 AM
Answer

Morad Ahmad

Rank: Junior Member

Posts: 37

Join Date: June 16, 2010

Recent Posts

I create a site on my local mashine and try to publish it on linux server which I ordered for my site. Which is the best was to move my site
to the new host?

1. Export as LAR and Import in the remote installation: I got allways errors "Site Template Community Site not found"!! (I used this website template at start to create my web site). But this site template exists also in the remote installation!!

2. Export DB and import in rempte?

3. Use staging. But my local maschine has no fixed IP. So I can't configure on the remote mashine to allow publishing.

Please tell me your suggestion and how to fix the Problem in Step 1, if this the recomended way?

Thanks,
Morad.
David H Nebinger
RE: Best practice to move Websites from local maschine to remote
August 21, 2012 5:00 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 9458

Join Date: September 1, 2006

Recent Posts

None of these.

Your local machine should be used for the development of plugins only so you can test their functionality.

All of your other stuff (content creation, settings, etc.) should all be done in the remote system.

The only things you move up there are the plugins for deployment.
Morad Ahmad
RE: Best practice to move Websites from local maschine to remote
August 21, 2012 5:17 AM
Answer

Morad Ahmad

Rank: Junior Member

Posts: 37

Join Date: June 16, 2010

Recent Posts

Thanks David,

but what can you do in this situation? How do you manage for example to create a site prototype in a test mashin and then to use this site
in a new production environment? will you do all the work again??

I also don't want to midify my site live. First I edit things (Articles, Images, Docs) localy, and then move/publish them to live/remote system. This is a very common reqirement!!

I headrd about Liferay Sync. Is it the right think to do that?

Thanks,
Morad.
David H Nebinger
RE: Best practice to move Websites from local maschine to remote
August 21, 2012 5:29 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 9458

Join Date: September 1, 2006

Recent Posts

It is a common requirement, but to satisfy requirement you need to be able to set up staging.

Since that's not an option, I think you're left with re-applying your changes on the remote site.

Liferay Sync is for moving files to/from your doc lib, but is not really for moving web content around.
Morad Ahmad
RE: Best practice to move Websites from local maschine to remote
August 21, 2012 5:40 AM
Answer

Morad Ahmad

Rank: Junior Member

Posts: 37

Join Date: June 16, 2010

Recent Posts

Thanks David again,

OK I can (fortunatly in my case) move the complete installation and export/import the mysql database. I hope it would work.

But is their any way to export and import data in Liferay for example to export only Webcontent and to imporrt again in a new site. Do I have to
use the Liferay Services to do such tasks?

Why not "export Site ... Import Site".... and what is the purpose of ".lar" export/import? And what about backup of content.

My LAR-Export/Import die import most of the sites. But a lot of Configuration lost!

Many Thanks.
Morad.
David H Nebinger
RE: Best practice to move Websites from local maschine to remote
August 21, 2012 6:19 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 9458

Join Date: September 1, 2006

Recent Posts

Morad Ahmad:
I can move the complete installation and export/import the mysql database. I hope it would work.


Don't forget to also move the data directory, as this is just as important as the database.

But is their any way to export and import data in Liferay for example to export only Webcontent and to imporrt again in a new site. Do I have to
use the Liferay Services to do such tasks?

Why not "export Site ... Import Site".... and what is the purpose of ".lar" export/import? And what about backup of content.

My LAR-Export/Import die import most of the sites. But a lot of Configuration lost!


I never found much use out of database dumps and LARs. The biggest problem you have to contend with is key collisions. For example, I create some record in the local system and it will be given the id of 27 and the local counter is incremented. In the other system I also create a record and it happens to get the id of 27. Now there are two distinct records in both systems with id of 27. You can't just extract the record from the first system and push to the second easily because you either lose the new record during import (because key already exists) or you overwrite the record there. If you're smart you get a new record in the second system, say id 28.

But you're still left importing records that have 27 as the FK values, somehow you have to know what the FKs are (because the 27 might be an FK for the table you care about or it could be an FK for a table you don't) and update those to be 28s rather than 27s...

It's just a typical DB nightmare!
Morad Ahmad
RE: Best practice to move Websites from local maschine to remote
August 21, 2012 7:38 AM
Answer

Morad Ahmad

Rank: Junior Member

Posts: 37

Join Date: June 16, 2010

Recent Posts

Hi David,

I think the most important think is CONTENT (Articles, DocLibrary, Blogs etc.). In reality you could have 1000s of Articles, PDFs, Images. To be able to simply export and import them ist a must for a CMS.

The configuration of the site (Pages, Portlets + Konfiguration) is less importatant. (Still important but less the content). You can do the work in days.

Thats why I think. Their must be separate parts to handle both.

But I still surprised how consultant etc. do the job? I mean it is reale a daily requirement (new hardwar, new OS Version, New Provider, Local To Remote, Test to Production, New Liferay Version, Oracle instead MySQL etc etc.

Is it to complicated to use Lifery-Scripting (Groovy?) to implement these?

?????

Many Thanks,
Morad.