Hi, I'm trying to move all my attachments from S3 into the local external data directory. I've set it to "Store file in External Data directory" in the options and then used the "Move Attachment Data" tool in the Rebuild Cache area. Unfortunately, the attachments are still being served from S3. Running XF 1.5.7 and [bd] Attachment Store 1.2.1 What can I do to get attachments to be served from /data instead of my S3 bucket?
How many files do you have on S3 (estimated is okie). And how long did the tool run? After the run, do you have anything in /data/attachment-files?
Hi there, Sorry for the late response. As you said earlier, you have 16k files in S3? How many are there in /data/attachment-files after the move? (They should have the same number of files fyi). Also, have you deleted your s3 bucket? How can they lead to dead links?
Tai @xfrocks There's 9091 files, I'm not sure how many are on S3. I haven't deleted the S3 bucket. However, the dead links do work if I change the Amazon URL to the relevant forum URL. For example, this is an attachment to one thread: This is the link on the thread (Amazon link), the file doesn't exist: https://smd-vault.s3.amazonaws.com/2014/08/3635_2b8c889e2580b3669fcb522b38de9b3f.zip If I change it to the data directory for my website it works: https://starmadedock.net/data/2014/08/3635_2b8c889e2580b3669fcb522b38de9b3f.zip It also looks like it didn't move those files to the attachment-files directory.
Tai @xfrocks Yea, I already removed that attachment. I can try to find another attachment where this the case? Unless attachments aren't deleted when you remove them from the thread?
xfrocks @Tai Any data is good as long as it's returning wrong url (s3) while the file is in external data.
Tai @xfrocks I PM'd you the dump, I took a look and 3635 wasn't deleted. So, I assume XF doesn't remove the entry from the DB when it's removed from a thread.
XenForo remove the row from db after a while. But only if you do hard-delete thread though. Anyway, I have checked the dump. According to it, the file is currently in s3, so that's why the s3 url is being generated... That means the add-on performed the file move but failed to update its database (for some unknown reason). I will need access to your server and db for further debug, can you provide the credentials?