Fórum

Document library not working after restored backup

thumbnail
Mohd Afif Abu Bakar, modificado 11 Anos atrás.

Document library not working after restored backup

Junior Member Postagens: 25 Data de Entrada: 06/08/12 Postagens Recentes
Hi and Good day to everyone

As of now I'm having a problem with all the documents and images stored in document library before. After I restored the portal from backup, those links that referred to document library are broken.

Another thing I would like to ask is the proper or the best way to make a backup of a portal. Right now I just compressed all portal folders together with portal database. I'm not sure whether its the correct way to do a backup although I do think its not a correct way to do backup since the document library files cannot be used anymore after restored.

I'm fairly new to Liferay hope someone can guide me on how to overcome these problem.
thumbnail
Paul ., modificado 11 Anos atrás.

RE: Document library not working after restored backup

Liferay Master Postagens: 522 Data de Entrada: 29/08/11 Postagens Recentes
If it's a complete restore the links should work.
  • Try and check if there are images / other files present at the location.
  • Run re-indexing


Basically for backup you need to preserve your
  • Properties files like portal-ext.propeties, system-ext etc
  • The data folder
  • Database
  • Deployments


Check out this documentation http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/backing-up-a-liferay-installati-7
thumbnail
Afif Abu Bakar, modificado 11 Anos atrás.

RE: Document library not working after restored backup

Junior Member Postagens: 25 Data de Entrada: 06/08/12 Postagens Recentes
Hi, thank you for replying.

May I know how to do re-indexing? And how can I check if the files are present at the location? From what I understand, all files stored in document library are saved in database right?

By the way, based on the link you gave, if I used document library to stored files, I need to backup Jackrabbit database too. Is it correct? How to verify that I really used Jackrabbit database for all those stored files?

Thank you.



Paul .:
If it's a complete restore the links should work.

  • Try and check if there are images / other files present at the location.
  • Run re-indexing


Basically for backup you need to preserve your
  • Properties files like portal-ext.propeties, system-ext etc
  • The data folder
  • Database
  • Deployments


Check out this documentation http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/backing-up-a-liferay-installati-7
thumbnail
Paul ., modificado 11 Anos atrás.

RE: Document library not working after restored backup

Liferay Master Postagens: 522 Data de Entrada: 29/08/11 Postagens Recentes
It basically depends on you Liferay version. For the latest version (i.e. 6.1 ) you can check the property (in portal.properties / portal-ext.properties)

    # Set the name of a class that implements
    # com.liferay.portlet.documentlibrary.store.Store. The
    # document library server will use this to persist documents.
    #
    #dl.store.impl=com.liferay.portlet.documentlibrary.store.AdvancedFileSystemStore
    #dl.store.impl=com.liferay.portlet.documentlibrary.store.CMISStore
    #dl.store.impl=com.liferay.portlet.documentlibrary.store.DBStore
    dl.store.impl=com.liferay.portlet.documentlibrary.store.FileSystemStore
    #dl.store.impl=com.liferay.portlet.documentlibrary.store.JCRStore
    #dl.store.impl=com.liferay.portlet.documentlibrary.store.S3Store


The one that is un-commented will tell you which one you are using.
To reindex you can do it as in this image

thumbnail
Afif Abu Bakar, modificado 11 Anos atrás.

RE: Document library not working after restored backup

Junior Member Postagens: 25 Data de Entrada: 06/08/12 Postagens Recentes
Thank you. I did the re-index thingy and still its not working. emoticon
And about the setting, none of it is in the portal-ext.properties. I couldn't find portal.properties though.
So I guess I'm not using Jackrabbit database, correct?

Ok I just want to know what happen actually when I stored the files in document library? Is there anything created other than it saved the files in database?

Thank you in advance.
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Document library not working after restored backup

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
By default, when you store a document in document library, the file is stored in data\document_library folder. If it's a document file (and not binary file as an image file), content of the document is scanned and index is created. The index is by default stored in the data\lucene folder. Finally, information about the document (e.g. file name and other meta data) are stored in the liferay database.

The index can be recreated. The file and metadata information in the database has to correspond so it's suggested to shutdown liferay before taking backups.

Right now I just compressed all portal folders together with portal database.


Did you backup \data folder in the same level as the tomcat-xxx folder? Did you recover your data to exactly the same mount point and directory? If you haven't, liferay would not be able to find your data because the location of the file specified in the database is going to be different.
thumbnail
Afif Abu Bakar, modificado 11 Anos atrás.

RE: Document library not working after restored backup

Junior Member Postagens: 25 Data de Entrada: 06/08/12 Postagens Recentes
Hitoshi Ozawa:
By default, when you store a document in document library, the file is stored in data\document_library folder. If it's a document file (and not binary file as an image file), content of the document is scanned and index is created. The index is by default stored in the data\lucene folder. Finally, information about the document (e.g. file name and other meta data) are stored in the liferay database.

The index can be recreated. The file and metadata information in the database has to correspond so it's suggested to shutdown liferay before taking backups.

Right now I just compressed all portal folders together with portal database.


Did you backup \data folder in the same level as the tomcat-xxx folder? Did you recover your data to exactly the same mount point and directory? If you haven't, liferay would not be able to find your data because the location of the file specified in the database is going to be different.


Yes. The data folder is in the same level as the tomcat folder.

For the bolded question, no. Its in different path. How can I correct the path?

I did the backup while the portal are running. Am I screwed now? emoticon
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Document library not working after restored backup

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
If you did a backup while liferay was running and you've entered some data, you may be missing it in the backup but this isn't the problem you're having now.

For the bolded question, no. Its in different path. How can I correct the path?


I think this is the main problem. If you've put it back in the same relative position and you're getting an error, try to set it up to the same absolute path and try migrating your data.
thumbnail
Afif Abu Bakar, modificado 11 Anos atrás.

RE: Document library not working after restored backup

Junior Member Postagens: 25 Data de Entrada: 06/08/12 Postagens Recentes
Hitoshi Ozawa:
If you did a backup while liferay was running and you've entered some data, you may be missing it in the backup but this isn't the problem you're having now.

For the bolded question, no. Its in different path. How can I correct the path?


I think this is the main problem. If you've put it back in the same relative position and you're getting an error, try to set it up to the same absolute path and try migrating your data.


Is there any possible way to correct the path? Through portal-setup-wizard.properties, portal-ext.properties, etc. The problem now is the previous portal are on Windows platform while the new one is on Linux. So I'm not sure whether I can create the same path as previous one.
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Document library not working after restored backup (Resposta)

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
The problem now is the previous portal are on Windows platform while the new one is on Linux. So I'm not sure whether I can create the same path as previous one.


This probably means you're really not trying to restore your system from the backup but trying to migrate to a new system. In this case, it may not be the file path but upper/lower case problem. Check the content of DL* tables to make sure case matches with the actual directory name/file name.
thumbnail
Afif Abu Bakar, modificado 11 Anos atrás.

RE: Document library not working after restored backup

Junior Member Postagens: 25 Data de Entrada: 06/08/12 Postagens Recentes
I end up manually repaired all broken links by uploaded the same content again to the same folders. Lucky its not that many. xD

Now just need to tackle this issue to avoid me doing the same thing again on other sites.

Anyway thank you guys emoticon
thumbnail
Mika Koivisto, modificado 11 Anos atrás.

RE: Document library not working after restored backup

Liferay Legend Postagens: 1519 Data de Entrada: 07/08/06 Postagens Recentes
If you are doing a hot backup you need to make sure no data changes while you are doing the backup. I blogged some time ago one way to do the backup on Linux with MySQL.
thumbnail
Afif Abu Bakar, modificado 11 Anos atrás.

RE: Document library not working after restored backup

Junior Member Postagens: 25 Data de Entrada: 06/08/12 Postagens Recentes
Thank you Mika. Bookmarked already. emoticon

Anyway the issue I got with document library is the files are in the document library but all are damaged. It's cannot be used anymore. Just need to re-upload all the files inside document library.