Reputation: 121
I want to import the sites and site related data from Dev environment to Local. I was wondering if I can just copy some of the Liferay DB tables into my Local environment and will get the same site and data in my local. I have tried importing the site with .lar import and export through Control Panel but it doesn't work as the lar import export has some bugs in Liferay 6.1.1 CE GA2 (the environment that we are using). Is this as straight forward as copying the tables or Are there more steps involved? Is Data folder in Liferay_home involved in this process? Do I have to copy the Data from? I do have an existing Liferay schema in Local which I don't care if it gets over-ridden.
Upvotes: 0
Views: 445
Reputation: 48057
With the keyword "some", the answer is: OMG, No! (read the "in general" paragraph for justification of the amplification)
If you want to completely move one environment to the other, the approach indeed works. I call it backup/restore, but it's an all-or-nothing approach, and indeed it involves the document library, which by default is located in ${liferay.home}
, unless you changed that default. It might also involve the search index, unless you want to reindex after restoring.
As a side-benefit this process will easily test your backup strategy and prove that you can use this data to restore on a completely new environment.
And, in general: You should never ever consider writing to any of Liferay's tables through other means than the Liferay API. This is known to have missed so many interdependencies that it will cause problems later. It might work right now, but imagine that you'd like to upgrade your installation one day - if the upgrade routines expect data that you don't have, you'll curse about the idea to write to the tables then - it might require a complete new setup if your upgrade fails then.
Side note: 6.1.1 was released in February 2013, the last update to 6.1.x, 6.1.2, is from December 2013. If you know of issues in 6.1.1, you might want to try if they've been fixed in 6.1.2, or in 6.2.x, or 7.0.x - and you should really go with a more current version sooner rather than later, not only because of the one issue you already know.
Upvotes: 1