留言板

Documents and Images missing after migration

Bernd Schmitzer,修改在9 年前。

Documents and Images missing after migration

Junior Member 帖子: 59 加入日期: 15-3-31 最近的帖子
Hello,
I recently migrated our database and document library from production to my local machine, but now I am unable so see documents and images.
Currenty running Liferay 6.2 GA2 on a Tomcat 7 with MySQL DB.

Here is what I did:
- Created a MySQL dumb from our database.
- Copied the data folder from production environment.
- Installed Liferay locally.
- Overwrote data folder with copy from production folder and imported sql File into new db.
- Updated jdbc connections

After that I can see users, permissions, contents and even custom structures but unfortunately images and documents are not being displayed. I can even find them in the document library and metadata like name, size etc is correct but they are not being displayed. Occasionally I get a FileNotFound Exception when loading an image but I couldn't spot any pattern for that.

I already tried to update permissions, export/import document library only, re-indexing search and many more but no success.

Would be nice if anyone could assist me with my problem.
thumbnail
Ramalingaiah Dudidmetle,修改在9 年前。

RE: Documents and Images missing after migration

Expert 帖子: 486 加入日期: 14-8-16 最近的帖子
Hi Bernd Schmitzer,

you can do the imagemagick and openoffice integration download and install



https://www.liferay.com/documentation/liferay-portal/6.2/user-guide/-/ai/getting-started-with-the-documents-and-media-port-12

This link for useful for you
thumbnail
Juan Gonzalez,修改在9 年前。

RE: Documents and Images missing after migration

Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
Bernd Schmitzer,修改在9 年前。

RE: Documents and Images missing after migration

Junior Member 帖子: 59 加入日期: 15-3-31 最近的帖子
Thanks for your replies. Unfortunately they didn't help me.
I can't see migrated images, even if logged in as admin. But once I upload a new image I have no problem displaying it.
So I'd guess that I did something wrong during migration but I can't pinpoint what it is.

I attached two files to clarify my problem:
newImage.jpg -- that's what I see when I upload a new image
oldImage.jpg -- that's what I get if i try to watch a migrated image (working just fine in production)
Mark Fitzgerald,修改在9 年前。

RE: Documents and Images missing after migration

Regular Member 帖子: 108 加入日期: 10-10-15 最近的帖子
The symptoms that you describe suggest that Liferay doesn't see your document_library folder. Perhaps it is in a different location than where it is expected? Are you able to track down where your newly uploaded image is stored in your data directory? That might offer some clues as to why your system can't see the ones that you copied.
thumbnail
Ramalingaiah Dudidmetle,修改在9 年前。

RE: Documents and Images missing after migration

Expert 帖子: 486 加入日期: 14-8-16 最近的帖子
Hi Mark Fitzgerald,

you can see the table name DLFILEENTRY

Thanks and Regards,
Ram
Bernd Schmitzer,修改在9 年前。

RE: Documents and Images missing after migration

Junior Member 帖子: 59 加入日期: 15-3-31 最近的帖子
Mark Fitzgerald:
The symptoms that you describe suggest that Liferay doesn't see your document_library folder. Perhaps it is in a different location than where it is expected? Are you able to track down where your newly uploaded image is stored in your data directory? That might offer some clues as to why your system can't see the ones that you copied.



Newly uploaded images are stored in the data folder e.g. C:\Development\liferay-portal-6.2-ce-ga4\data\document_library\10154\10180\8201.
For exisiting images I get:

12:43:23,370 ERROR [http-bio-8080-exec-54][ImageImpl:66] Error reading image 2927056
com.liferay.portlet.documentlibrary.NoSuchFileException: C:\Development\liferay-portal-6.2-ce-ga4\data\document_library\0\0\2927056.jpg\1.0

The provided location doesn't even exist and therefore I don't really get why it is working in production environment.
Mark Fitzgerald,修改在9 年前。

RE: Documents and Images missing after migration

Regular Member 帖子: 108 加入日期: 10-10-15 最近的帖子
Normally, documents and images are stored in the non-zero folder which matches the company ID of your portal instance. Items in the zero folder tend to be documents not handled by the normal document uploader. I'm speaking generally, of course, as there are probably exceptions. However, documents uploaded through the documents and images uploader screen should be in your 10154 directory.

It seems like there is a setting that wasn't set that tells the document library where to look for documents. Maybe you can look in the DLFileEntry table to see what the difference in entries is between a newly uploaded file and a migrated file.

As another experiment, if you click the 'Download' link for an older image, does it give you the same error message that you listed?
Bernd Schmitzer,修改在9 年前。

RE: Documents and Images missing after migration

Junior Member 帖子: 59 加入日期: 15-3-31 最近的帖子
There seems to be no difference between old and new files, at least in the dlfileentry table.

Download button leads me to a "Not Found" page but no exception is thrown.
Mark Fitzgerald,修改在9 年前。

RE: Documents and Images missing after migration

Regular Member 帖子: 108 加入日期: 10-10-15 最近的帖子
I guess the next thing to do would be to see if the files exist in the expected location.

Identify a record in your DLFileEntry table that represents an image that is not showing for you. Navigate to the location of this file on your directory system using the following guide:

{$LIFERAY_HOME}/data/document_library/<companyId>/<folderId>/<name>

The items in angle brackets represent the values that you find in the corresponding columns in DLFileEntry. The image files will be named something like '1.0'. If you find the file, copy it to a different location on your drive and rename it to something like '1.0.jpg', then open it to confirm that it is the image that you were seeking.
Bernd Schmitzer,修改在9 年前。

RE: Documents and Images missing after migration (答复)

Junior Member 帖子: 59 加入日期: 15-3-31 最近的帖子
Just identified the problem.

Our data export was corrupt. It simply stopped copying the data after 62MB were reached. Once an admin tried it we got our full ~540MB.
So it was a permission problem on our production machine.

Thanks for your help!