Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: backup liferay portal
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?
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?
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.
- 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.
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?
And is it possible to backup the entire portal folder?
Cross-referencing. Please limit yourself to one thread per topic in future, and collect all the important information in one place.
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.
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.
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
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?
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?
i'm testing the database restore and i find all the content of liferay portal this way is successful
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™