XF 2.1 Attachments not found after import

AbuGhaith

Well-known member
Hello,

I hope I found a reasonable solution to the issue.

I was doing an import operation from vb 3.8.11 to XF 2.1.7

The operation was done fine,

but with attachment, the import not working perfectly,

in Vb there more than 50.000 attachments, but after import, I found just 80

Thank You,
 
This isn't something we've had reported therefore we do not expect this to be a bug, currently.

We would need more details. Particularly significant is if you had any custom changes to vBulletin which meant files were stored in a different path to what would normally be expected.

Though usually issues like this are simply through defining the wrong path during the import config.
 
Thank you @Chris D for the Quick reply.
I have put the correct Path during the import, if I don't, it can't import 80 files Attachment.
So, if I Repeat the process just for attachment files it will work Successfully.
 
If only 80 files were imported then it could be something like file/folder permissions or ownership, which prevented the other files from being copied across.

There isn't an easy fix once the import is done - you would have to do a brand new import in order to bring over all of the missing attachments.
 
Not sure if this helps, check to make sure they are not stored in the db (a vB setting). There could be some anomalies in the folder and the rest are in db, and you can move them. Or check to see if you have 2 attachments folders. Right click to find the path.
 
If only 80 files were imported then it could be something like file/folder permissions or ownership, which prevented the other files from being copied across.

There isn't an easy fix once the import is done - you would have to do a brand new import in order to bring over all of the missing attachments.

Sorry for the mistake (80 files are uploaded after import) there nothing imported.

Not sure if this helps, check to make sure they are not stored in the db (a vB setting). There could be some anomalies in the folder and the rest are in db, and you can move them. Or check to see if you have 2 attachments folders. Right click to find the path.

Yes you are right all attachments are stored in DB
now I must know the correct Attachments Path

Thank you for your help
 
Moving Attachments to the Filesystem
By default vBulletin stores attachments in the database for maximum compatibility. In order to store attachments in the file system, your server will need to have SAFE_MODE disabled. This is something that only your host can do.

You will be presented with the following screen if you have attachments in the database:
attachment_storage.png

To begin the process of moving attachments to the database, press [Go]

You will then be presented with the following:
attachment_storage_dbtofs1.png

Note:
vBulletin tries to determine if you have SAFE_MODE enabled and may display an error message instead of the above screen. If this happens, you will need to contact your host about disabling SAFE_MODE for your site or choose to leave attachments in the database.
The attachment file path is the location on your server that you wish to store attachments in. We suggest you create a path that is above your web root, which means a directory that is not below public_html. If you wish to create the directory in your web root, we then suggest you place a .htaccess file to block people from accessing it directly. If you do not do this, then anyone will be able to open your attachments directly by navigating this directory in their browser.

This directory must be writable by PHP, which generally means it must either be owned by the same user that your web server is running under or set to permissions 0777 or Global Read/Write on Windows Systems. Please refer to your system documents to find out how to set these permissions.

Please use the full qualified path name to this directory.

Press [Go]when you have entered a valid directory. vBulletin will test the directory for proper permissions and inform you if the permissions are not set properly.
attachment_storage_dbtofs2.png

The above screen is the final step before the actual moving begins. After pressing [Go] on this page, the moving of files from the database will begin.

After you press [Go], the attachments will be copied from the database to the file system. At the end of the process you will have attachments in both locations and will be presented with the following screen as confirmation that you wish to finalize the process by deleting all attachments from the database.
attachment_storage_dbtofs3.png

Pay close attention to the Attachments in Database and Total Attachments Processed totals. If these totals do not match up then you could possibly lose attachments. If Total Attachments processed is 0 then something is configured wrong and blocking attachments from being written to the file system.

If you feel, all is well, select the <Yes> option to the right of Finalize and press [Go]. At the point all attachments will be removed from the database. The attachment table will then be optimized to recover file space. This step can take an exceedingly long time to complete so please be patient.
 
Back
Top Bottom