Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how to export existing site to xml for use by this library #30

Open
nicerloop opened this issue Sep 9, 2021 · 4 comments
Open
Labels
good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Comments

@nicerloop
Copy link

Hi,

I have an existing Liferay Portal, living in database, and would like to export it as xml in order to consume it with this library. Can you give me some pointers?

@ktor
Copy link
Member

ktor commented Sep 9, 2021

Hi @nicerloop,

you can export Liferay data in LAR format (zipped xml) with standard Liferay tooling and import it with standard Liferay tooling as well.

The liferay-db-setup-core library however does not consume LAR format. The same goes the other way around. What is your use case? Is it backup?

@nicerloop
Copy link
Author

Hi,

LAR export is not supported between Liferay versions, and will not evolve anymore (https://learn.liferay.com/dxp/latest/en/installation-and-upgrades/upgrading-liferay/reference/maintenance-mode-and-deprecations-in-7-3.html).

I would like to have my portal contents versioned as source, to deploy it without hassle in different contexts, flowing through different Liferay versions. But I would rather avoid re-authoring the existing content (multiple Liferay sites, complex contents, various environments) and have/get/build a way to export it to a versionable format.

This library seems to handle the implementation of an xml-described site into Liferay, I need the reverse operation to close the loop.

@ktor ktor added good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested labels Sep 9, 2021
@ktor
Copy link
Member

ktor commented Sep 9, 2021

The feature is currently not supported but I could use it as well, especially for user created content like articles/pages. I imagine this could very well be developed organically.

For example I currently need basic site pages/configuration dump and I was going to write declarations manually but writing a dump tool seems to be a better idea and I could reuse it on other projects as well.

Let's say:

InputStream LiferaySetupDump#site(Long siteId)
InputStream LiferaySetupDump#article(Long articleId)
InputStream LiferaySetupDump#categories(Long vocabularyId)

What would be your idea of a dump API?

@nicerloop
Copy link
Author

I'm quite new into Liferay, been discovering the product for some weeks with this project I'm newly involved with, so I'd imagine naively the reverse of the setup() methods: Setup LiferaySetup#dump(), or to allow for big sites, InputStream LiferaySetup#dump().

I currently do not master Liferay enough to suggest anything else, as I am in the process of researching how to make the current situation more manageable on the Liferay contents side.

Having a global view of the contents, even as a massive XML file, is a first step to managing the contents.

Alternatively, could the contents be dumped by parts following their nature, and be joined in a parent XML setup file following the XSD using XInclude?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants