RE: backup liferay portal

ghadeer raad, modified 5 Years ago. Junior Member Posts: 51 Join Date: 6/2/20 Recent Posts
hi
i read the doc. of how can backup the liferay i need  know which is the way that used to backup the liferay server and liferay home file ?do this manually by copy the files? or there is another way such as software or app?
thumbnail
Christoph Rabel, modified 5 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
You should:
- Backup the data/document_library folder
- Create a database backup
- Backup all relevant configuration files (portal-*.properties, changes to setenv.sh, server.xml, ..., osgi/config files)
- Restore the portal to a new server (note: You need to reindex the search engine)
The last step is important and will show you if you missed something.
ghadeer raad, modified 5 Years ago. Junior Member Posts: 51 Join Date: 6/2/20 Recent Posts
I mean, do I need to use a specific application to back up these files?
And is it possible to backup the entire portal folder?
thumbnail
Olaf Kock, modified 5 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Cross-referencing. Please limit yourself to one thread per topic in future, and collect all the important information in one place.
thumbnail
Olaf Kock, modified 5 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
ghadeer raad:

I mean, do I need to use a specific application to back up these files?
And is it possible to backup the entire portal folder?

The instructions tell you what to do. The tools you use are whatever fits your environment best. mysqldump is one option (but make sure nobody's writing to the database while you back it up. Also, for the document library, make sure you get an atomic copy.

Key is, as I said elsewhere, to validate that you can use your backup to restore to a completely new system. Otherwise it's worthless. This will tell you if your choice of tools is appropriate.
And as you ask for it in some other thread: Backup instructions are identical for Liferay DXP and Liferay Portal CE.
thumbnail
Christoph Rabel, modified 5 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
mysqldump is one option (but make sure nobody's writing to the database while you back it up

That's not an issue, mysqldump locks all tables when exporting a database. The only operations that could cause issues are adding and deleting files. In theory you would have to lock the database, copy the files, unlock the database. But this could take a while and impact users.
I usually just rsync the files in the middle of the night and assume that no editor will do uploads/delete document library entries at that time.
ghadeer raad, modified 5 Years ago. Junior Member Posts: 51 Join Date: 6/2/20 Recent Posts
I use mysqldump code in bat file then use task schedule to make auto backup each 1 hour  this way  save any change made on my database
thumbnail
David H Nebinger, modified 5 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
That is not enough (unless you are using the database to store your documents).


Have you tested your backup? One issue you always face is what happens if a backup occurs in the middle of a flurry of updates. At any single point in the middle of the flurry, if a backup is taken, does that backup represent a complete database or could it have partial updates that won't make sense without some number of updates that happened just after that point...

Also, have you tested your restore and relaunch process? If you haven't, well then you don't really have a backup, all you have is a file you're creating every hour...

For it to truly be a backup, you have to know the outcome of restoring the DB, pointing an instance of Liferay at it, starting it up and testing it out. Are the docs still there? Are the articles still there? Is the site functional and complete? etc etc.

If you don't do that, well then you're just assuming that you can do a restore and, well, trust me when I say that if it ever comes time that you need to restore, how upset are folks going to be if you find out that the restore doesn't work?
ghadeer raad, modified 5 Years ago. Junior Member Posts: 51 Join Date: 6/2/20 Recent Posts
i'm testing the database restore and i find all the content of liferay portal this way is successful