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.
- Perl with DBI
- Linux LVM with lvcreate and lvremove
- Download latest release or clone the git master branch
$ git clone git://github.com/mikakoivisto/liferay-backup.git
- Add liferay-backup directory to your path or reference the backup_liferay.pl script directly
- 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';