Liferay Backup

I originally created this script both as a proof of concept to demonstrate on how to create a consistent backup of Liferay database and document library. It’s now part of my backup script that among other things creates a backup of this website. The script is written in Perl and is released under GPL license.

Requirements

  • Perl with DBI
  • rsync
  • mysqldump
  • Linux LVM with lvcreate and lvremove

Installation

  1. Download latest release or clone the git master branch
    $ git clone git://github.com/mikakoivisto/liferay-backup.git
  2. Add liferay-backup directory to your path or reference the backup_liferay.pl script directly
  3. Create a backup user to your database with LOCK TABLES, SELECT, FILE, RELOAD, SUPER and SHOW VIEW priviledges
    mysql> GRANT LOCK TABLES, SELECT, FILE, RELOAD, SUPER, SHOW VIEW ON lportal.* TO dba-backup@'localhost' IDENTIFIED BY 'mypassword';