Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Afif Abu Bakar
Document library not working after restored backup
30. September 2012 20:53
Antwort

Afif Abu Bakar

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 6. August 2012

Neue Beiträge

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.
Bart Simpson
RE: Document library not working after restored backup
30. September 2012 21:24
Antwort

Bart Simpson

Rang: Liferay Master

Nachrichten: 523

Eintrittsdatum: 29. August 2011

Neue Beiträge

If it's a complete restore the links should work.
  1. Try and check if there are images / other files present at the location.
  2. Run re-indexing


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


Check out this documentation http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/backing-up-a-liferay-installati-7
Afif Abu Bakar
RE: Document library not working after restored backup
30. September 2012 21:38
Antwort

Afif Abu Bakar

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 6. August 2012

Neue Beiträge

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.

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


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


Check out this documentation http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/backing-up-a-liferay-installati-7
Bart Simpson
RE: Document library not working after restored backup
1. Oktober 2012 01:36
Antwort

Bart Simpson

Rang: Liferay Master

Nachrichten: 523

Eintrittsdatum: 29. August 2011

Neue Beiträge

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)

 1    # Set the name of a class that implements
 2    # com.liferay.portlet.documentlibrary.store.Store. The
 3    # document library server will use this to persist documents.
 4    #
 5    #dl.store.impl=com.liferay.portlet.documentlibrary.store.AdvancedFileSystemStore
 6    #dl.store.impl=com.liferay.portlet.documentlibrary.store.CMISStore
 7    #dl.store.impl=com.liferay.portlet.documentlibrary.store.DBStore
 8    dl.store.impl=com.liferay.portlet.documentlibrary.store.FileSystemStore
 9    #dl.store.impl=com.liferay.portlet.documentlibrary.store.JCRStore
10    #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

Afif Abu Bakar
RE: Document library not working after restored backup
1. Oktober 2012 02:16
Antwort

Afif Abu Bakar

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 6. August 2012

Neue Beiträge

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.
Hitoshi Ozawa
RE: Document library not working after restored backup
1. Oktober 2012 03:52
Antwort

Hitoshi Ozawa

Rang: Liferay Legend

Nachrichten: 7990

Eintrittsdatum: 23. März 2010

Neue Beiträge

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.
Afif Abu Bakar
RE: Document library not working after restored backup
1. Oktober 2012 06:50
Antwort

Afif Abu Bakar

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 6. August 2012

Neue Beiträge

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
Hitoshi Ozawa
RE: Document library not working after restored backup
1. Oktober 2012 18:34
Antwort

Hitoshi Ozawa

Rang: Liferay Legend

Nachrichten: 7990

Eintrittsdatum: 23. März 2010

Neue Beiträge

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.
Afif Abu Bakar
RE: Document library not working after restored backup
2. Oktober 2012 00:10
Antwort

Afif Abu Bakar

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 6. August 2012

Neue Beiträge

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.
Hitoshi Ozawa
RE: Document library not working after restored backup
2. Oktober 2012 16:38
Antwort

Hitoshi Ozawa

Rang: Liferay Legend

Nachrichten: 7990

Eintrittsdatum: 23. März 2010

Neue Beiträge

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.
Afif Abu Bakar
RE: Document library not working after restored backup
4. Oktober 2012 09:28
Antwort

Afif Abu Bakar

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 6. August 2012

Neue Beiträge

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
Mika Koivisto
RE: Document library not working after restored backup
4. Oktober 2012 11:11
Antwort

Mika Koivisto

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 1499

Eintrittsdatum: 7. August 2006

Neue Beiträge

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.
Afif Abu Bakar
RE: Document library not working after restored backup
4. Oktober 2012 11:17
Antwort

Afif Abu Bakar

Rang: Junior Member

Nachrichten: 25

Eintrittsdatum: 6. August 2012

Neue Beiträge

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.