Stephane FIRMIN 10 Years Ago Very useful, thank you.Just had to modifiy your backup script from "tar tjf ..." to "tar cjf ..." ;) Please sign in to reply. Reply as... Cancel
David H Nebinger 10 Years Ago Thanks Stephane, I fixed the blog entry to resolve the issue. Good catch! Please sign in to reply. Reply as... Cancel
David Lee 9 Years Ago Not to nitpick but just wanted to point out that you changed "lportal" to "liferay" in your recovery section Please sign in to reply. Reply as... Cancel
David Lee 9 Years Ago HI David,I wanted to see how robust this backup strategy was so I did some testing and I have some questions. Q1 - Regarding liferay's file system, if I were to delete parts of the ROOT folder, would the data backup be able to handle that kind of modification/data loss to the server? Q2 - While the DB backup is good for retrieving deleted files that were uploaded using the document and media portlet, yet when I purposely dropped lportal, the DB backup did help to bring up the original admin. But now my Control Panels/Admin bar at the top of the page is gone. Do you know how to recover fully so that Control Panel functionality is back? Thanks,David Please sign in to reply. Reply as... Cancel David H Nebinger David Lee 9 Years Ago The backup/recovery is meant to help protect you from data loss/corruption. It will not do anything to restore any of your webapps (including Liferay). So no, it's not going to handle question 1 at all. And probably the same for #2, if you restore but don't have the themes, hooks, ext, and other plugins, things may not work as you'd expect.Should be easy to fix, though, if you just include webapps into your backup process, although some may argue that you should also grab the conf, the libs, the bin directory, ... It can easily turn into a slippery slope trying to guage how much should be included in your nightly backup.It would be easier to grab a backup of your complete tomcat directory before/after making a change (i.e. editing a config file or deploying a new plugin). This will minimize the amount of data that you're collecting for backup yet still leave you in a position to restore in case of fatal error.But at the end of the day system admins will have their own perspectives on how much to back up and when... Please sign in to reply. Reply as... Cancel
David H Nebinger David Lee 9 Years Ago The backup/recovery is meant to help protect you from data loss/corruption. It will not do anything to restore any of your webapps (including Liferay). So no, it's not going to handle question 1 at all. And probably the same for #2, if you restore but don't have the themes, hooks, ext, and other plugins, things may not work as you'd expect.Should be easy to fix, though, if you just include webapps into your backup process, although some may argue that you should also grab the conf, the libs, the bin directory, ... It can easily turn into a slippery slope trying to guage how much should be included in your nightly backup.It would be easier to grab a backup of your complete tomcat directory before/after making a change (i.e. editing a config file or deploying a new plugin). This will minimize the amount of data that you're collecting for backup yet still leave you in a position to restore in case of fatal error.But at the end of the day system admins will have their own perspectives on how much to back up and when... Please sign in to reply. Reply as... Cancel
Jack Bakker 9 Years Ago I use bacula (http://blog.bacula.org/) which can reach out to linux, mac, and windows hosts to be backed up ; in the central config (/etc/bacula/bacula-dir.conf) you can involve a pre-job reference which runs a script on the host being backed up .. central config also specifies fileset definitions to include/exclude folders/files (so including liferay */data and db dumps by mysql or postgresql can be defined) Please sign in to reply. Reply as... Cancel
David Lee 9 Years Ago Also one other question I had was the data recovery. According to the recovery steps, its seems the filesystem data resides in /opt/liferay/data/? But I thought everything was in the liferay home directory or even in the lifearyhomedir/data. Can you please explain why we are backing and restoring files in /opt/liferay/data? Prior to checking out this page, I never had a /opt/liferay/data folder on my server. Thanks for all the help. Please sign in to reply. Reply as... Cancel David H Nebinger David Lee 9 Years Ago You can specify the location of everything using portal-ext.properties, but my installation had /opt/liferay as the LIFERAY_HOME var, so /opt/liferay/{data,deploy,logs,etc} are all valid.Depending upon where your LIFERAY_HOME is, you'll have to adjust the script accordingly. Please sign in to reply. Reply as... Cancel
David H Nebinger David Lee 9 Years Ago You can specify the location of everything using portal-ext.properties, but my installation had /opt/liferay as the LIFERAY_HOME var, so /opt/liferay/{data,deploy,logs,etc} are all valid.Depending upon where your LIFERAY_HOME is, you'll have to adjust the script accordingly. Please sign in to reply. Reply as... Cancel
David Lee 9 Years Ago thank you so much for your detailed explanation and also for you time David. I really enjoyed this article as it gave me a good starting point for my backup strategy. Please sign in to reply. Reply as... Cancel
Jack Bakker 9 Years Ago This is a blog that is informative while not trying to be generic (technically) for all scenarios. "This is how I do things in my xyz enviro" by an expert is valuable and honest. I can only imaging that from forum, to blog comment, to blog, to documentation is exponential wrt contributor time spent. Complain ! make it better... with sounds that people might share. /opt/*. Please sign in to reply. Reply as... Cancel
Vincent CARNINO 9 Years Ago Hi David, I have a question about the database copy. You suggest that the staged server database is a recent copy of the live server database but in this case, user accounts are copied as well so this implies that every user is able to access to the staged server and may modify anything he wants. Am I right ? Isn't it a problem ? Please sign in to reply. Reply as... Cancel