Backing Up A Liferay Installation
Once you have an installation of Liferay Portal running, you will want to have proper backup procedures in place in case of a catastrophic failure of some kind. Liferay is not very different from any other application that may be running in your application server, but there are some specific components that need to be backed up in addition to your regular backup procedures for your application server.
If you have extended Liferay or have written portlet or theme plugins, they should be stored in a source code repository such as Subversion, CVS, or Git. This repository should be backed up on a regular basis to preserve your ongoing work.
If you are extending Liferay with the Extension Environment, you will want to make sure that you also store the version of the Liferay source on which your extension environment is based. This allows your developers convenient access to all of the tools they need to build your extension and deploy it to a server.
Liferay's File System
Liferay's configuration file, portal-ext.properties, gets stored in the Liferay Home folder, which is generally one folder up from where your application server is installed (see Chapter 1 for specific info for your application server). At a minimum, this file should be backed up, but it is generally best to back up your whole application server.
If you have followed the procedure in the previous chapter to modify your ehcache configuration, you will have cache configuration files in the deploy location of Liferay. You will need to back up this location.
Liferay also stores configuration files, search indexes, cache information, and the default Jackrabbit document repository in a folder called data in Liferay Home. You should generally back up all of the contents of your Liferay Home folder.
If you have modified the location where the Document Library stores files, you should also back up this location.
Liferay's database is the central repository for all of the Portal's information and is the most important component which needs to be backed up. You can do this by either backing up the database live (if your database allows this) or by exporting the database and then backing up the exported file. For example, MySQL ships with a mysqldump utility which allows you to export the entire database and data into a large SQL file. This file can then be backed up. In case of a database failure, it can be used to recreate the state of the database at the time the dump was created.
If you are using Liferay's Document Library with the Jackrabbit JSR-170 repository to store documents in a database, the Jackrabbit database should be backed up also.