Foren

Backup and Restore Liferay on a remote server

Isabel Moyo, geändert vor 15 Jahren.

Backup and Restore Liferay on a remote server

Junior Member Beiträge: 37 Beitrittsdatum: 23.04.08 Neueste Beiträge
I need to backup liferay installation and restore it on a remote server. What do I need to backup and what needs to be on remote server for restoration to work?
thumbnail
Patrik Bergström, geändert vor 15 Jahren.

RE: Backup and Restore Liferay on a remote server

New Member Beiträge: 10 Beitrittsdatum: 14.08.07 Neueste Beiträge
As of now, I would do it the "hard" way and compress the whole Tomcat (or corresponding) directory and the Liferay directory, usually located in your home directory, as well as dumping the database. Then i would ship all parts over to the new server. By this approach you can be sure everything will be transferred exactly the way it was.

An alternative is to use the LAR export which you access from the portal UI. However, the LAR function is not complete for this purpose yet. See Forum thread. The LAR function is developing though. See e.g. LEP-6346.
thumbnail
Victor Zorin, geändert vor 15 Jahren.

RE: Backup and Restore Liferay on a remote server

Liferay Legend Beiträge: 1228 Beitrittsdatum: 14.04.08 Neueste Beiträge
Isabel Moyo:
I need to backup liferay installation and restore it on a remote server. What do I need to backup and what needs to be on remote server for restoration to work?

Lar ...

LAR would not do the job if you have multiple communitiesm you would need to make LAR for every community. Plus, using LAR is not error-prone.

If your remote server is a disaster recovery site:
Initially:
* make sure that you have the same installation of Liferay on all servers

Whenever you deploy new portlets:
* make sure that they7 are deployed on all servers

To make an end-of-day backup:
1. Create 'lportal' database dump on main server
2. Zip your lucene and jackrabit directories, (check their location in your portal.properties or portal-ext-properties file)
3. Move database dump and lucene/jackrabit zips to backup server
4. shutdown backup server
5. restore database, override lucene/jackrabbit directories
6. start backup server.

This is a complete copy.
thumbnail
Björn Ryding, geändert vor 15 Jahren.

RE: Backup and Restore Liferay on a remote server

Liferay Master Beiträge: 582 Beitrittsdatum: 16.05.07 Neueste Beiträge
Victor Zorin:
Isabel Moyo:
I need to backup liferay installation and restore it on a remote server. What do I need to backup and what needs to be on remote server for restoration to work?

Lar ...

LAR would not do the job if you have multiple communitiesm you would need to make LAR for every community. Plus, using LAR is not error-prone.

If your remote server is a disaster recovery site:
Initially:
* make sure that you have the same installation of Liferay on all servers

Whenever you deploy new portlets:
* make sure that they7 are deployed on all servers

To make an end-of-day backup:
1. Create 'lportal' database dump on main server
2. Zip your lucene and jackrabit directories, (check their location in your portal.properties or portal-ext-properties file)
3. Move database dump and lucene/jackrabit zips to backup server
4. shutdown backup server
5. restore database, override lucene/jackrabbit directories
6. start backup server.

This is a complete copy.


Thank you for your informative post. However, Patrik did not suggest using LAR exports. He suggested exactly the same approach that you suggest.

Regards,
Björn

Edit: I just reread this post and want to clarify that I think it's great that Victor took the time to provide Isabel with a more detailed answer. When I initially posted I just thought it was bit weird to summarize Patrik's post with "Lar ...".
Isabel Moyo, geändert vor 15 Jahren.

RE: Backup and Restore Liferay on a remote server

Junior Member Beiträge: 37 Beitrittsdatum: 23.04.08 Neueste Beiträge
Thank you so much for your help Victor. Your outlined solution worked; just what I needed. You were right, I got a complete copy of Liferay installation from one server to another.

Thanks again,
Isabel
Isabel Moyo, geändert vor 15 Jahren.

RE: Backup and Restore Liferay on a remote server

Junior Member Beiträge: 37 Beitrittsdatum: 23.04.08 Neueste Beiträge
Thank you all for your contributions. Thanks Victor for a complete, step-by-step suggestion; I will try it out and let you know how that goes.
thumbnail
Steve Mock, geändert vor 14 Jahren.

RE: Backup and Restore Liferay on a remote server

New Member Beiträge: 7 Beitrittsdatum: 13.10.09 Neueste Beiträge
Is there anything else that can affect this?

I've gone through this process, and I get no errors at all upon startup or when importing the database, but when I try to access the portal it continuously reloads the /home page over and over again through a javascript redirect. Perhaps something to do with the community virtual host settings or the Portal>Settings Home URL?

Thanks!
thumbnail
Steve Mock, geändert vor 14 Jahren.

RE: Backup and Restore Liferay on a remote server

New Member Beiträge: 7 Beitrittsdatum: 13.10.09 Neueste Beiträge
Ok, sorted out my issue, it was indeed with the virtual host setting for the default community, which was set to a different hostname (because it's a different host).

I needed to when I first brought the new liferay instance up, go directly to http://server.com:8080/web/guest/home , then go into the default community's Manage Pages->Settings->Virtual Host

and correct the Public Virtual Host to reflect the new hostname. Then all was well.
thumbnail
Andreas Oberhack, geändert vor 14 Jahren.

RE: Backup and Restore Liferay on a remote server

New Member Beiträge: 9 Beitrittsdatum: 09.03.09 Neueste Beiträge
Hi all,

the only issue I have with this approach is that lucene is permanently reindexing - so if you are ziping in a wrong moment it might save an inconsistent index.

Also the database dump and the ziped lucene files might be in an inconsistent state.

Could that be a proplem?

Andreas
www.xaxii.com
thumbnail
Stephen Mock, geändert vor 13 Jahren.

RE: Backup and Restore Liferay on a remote server

New Member Beiträge: 7 Beitrittsdatum: 13.10.09 Neueste Beiträge
Perhaps missed in this is that you probably need to shut down your Liferay installation, so that Lucene is not doing indexing at the moment.
thumbnail
Petr Vlček, geändert vor 12 Jahren.

RE: Backup and Restore Liferay on a remote server

New Member Beiträge: 5 Beitrittsdatum: 12.09.10 Neueste Beiträge
And what if we didn't compress Lucene's directory during back-up and let Lucene completely rebuild it's index after restoring Liferay instance from backup? Are there any risks?