Foros de discusión

Add Ability to Backup and restore Web Sites with real size content

thumbnail
ALi Reza Kazemi, modificado hace 9 años.

Add Ability to Backup and restore Web Sites with real size content

New Member Mensajes: 12 Fecha de incorporación: 9/01/11 Mensajes recientes
We want to add this feature. to help liferay managers in backing up an web site as full backup and restore it when it is needed with real size data such as 2 GB per web site.
So the backup process will use Export/Import API but it will done in background and control by threads. so an administrator could start backing up a web site and monitor back up process and after it finished the result lar file would store in server space. portal administrator could move these lar files from a server to another server manually and this portlet would recognize all lar files that stores in server space.
portal administrator could restore it when it is needed and could monitor the restore process too.
this feature needs many changes in data handling classes in liferay source so it should implement in liferay core nor in marketplace.
Issue link:
https://issues.liferay.com/browse/LPS-50866
thumbnail
Juan Fernández, modificado hace 9 años.

RE: Add Ability to Backup and restore Web Sites with real size content

Liferay Legend Mensajes: 1261 Fecha de incorporación: 2/10/08 Mensajes recientes
Hi Ali:
I think this is something interesting and there have been some discussions about this so far in the community and among customers too.
If you want to build this, what I would recommend is to start breaking down all the things you need to implement for this to become a reality, in the format of small tasks that are easier to implement and manage. Also, I wanted to ask why do you think this can't be a plugin in the product: have you found any limitations that you can't overcome? Making it a plugin would be easier to distribute to the community, to receive contributions from other community members and it would be available for 6.2 which is the version most customers are using or migrating to.
Thoughts?
Thanks for sharing your idea with the community!
Juan
thumbnail
ALi Reza Kazemi, modificado hace 9 años.

RE: Add Ability to Backup and restore Web Sites with real size content

New Member Mensajes: 12 Fecha de incorporación: 9/01/11 Mensajes recientes
Dear Juan
Thank you for your reply. and about your question, Some sounds make me to change the source in this case:
1- The exist import/export feature needs implementation improvement to support a good backup not just a small lar file. for example in this file JournalPortletDataHandlerImpl, you could see some codes like this(I am looking at 6.1 ce GA1):

portletDataContext.addZipEntry(
					articleImagePath, image.getTextObj()); 

let me ask you what would happen if image was null? there is not any simple try and catch. so all of the backup process would break and fails because of one simple image missing!
the backup process should continue with some errors and warnings and backup abortion is not accepted. so it' better to change it to something like this:

try{
                    byte[] textObj2 =  image.getTextObj();
                    if(textObj2 != null){
                        portletDataContext.addZipEntry(
                            articleImagePath, textObj2);
                    }
                }catch (Exception e){

                }


I could not count how many changes needs in data handle files but I am sure it is important before thinking about a robust back up and restore sytem
2- I have not any solution for creating a backup process with a simple stop/start/pause button!! because when you have a live web site, it's better to start backup when content update is rarely or stopped to save all data and never miss some of them. so in my idea there is a simple start button that press one time and it make backup status running. so after it finished you could see that backup status is completed. and if you are looking at this operation in this period you could see what is happening... for example backup is archiving journal articles and now is on this article:"why liferay is good?". if an error occurred in while, user could see the problem and cause of it. so may be he could solve it by removing a simple article or something else. and press start again to start backup process another time.
in above case I need to change data handle files to call back up portlet and inform it about process. may be other communication methods was possible here but I think as backup and restore portlet is an important tools it could be in source and have a simple function call to change the back up status.

I would be happy to have your idea about this.
Thanks.