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 WEB-INF/classes folder in the location to which your application server deployed Liferay. At a minimum, this file should be backed up, but it is generally best to back up your whole application server.
Liferay also stores configuration files, search indexes, cache information, and the default Jackrabbit document repository in a folder called liferay. This folder resides in the home directory of the user ID under which Liferay is running. On Unix-based systems, this folder will likely be in /home/<user id>. This folder should be backed up also.
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 extensively, it is likely that you have configured Jackrabbit to store documents in a database rather than the file system. In this case, the Jackrabbit database should be backed up also.