PDA

View Full Version : How to delete Orphan Attachments


eurosoft
11-10-2008, 05:48 AM
Respected Helper,
Greetings and Welcome,
I wish you receive this mail of me in the best of everything.

I moved from SMF to vBulletin. We have 40K+ attachments. I do not remeber how many times I imported the posts and moved attachments to and from database. Now everything is fine

but I have 160K+ files in my attachments folder.
Ok most of the files are images so 40K images+40K thumbnails. Still 80K+ files seems to be orphan. Database also shows 40K+ so my question is:

How can I find and delete these to reclaim 15GB of space. That would make taking backup easier among other things. I have vps, cpanel and root access.

Any script or idea is badly needed.

I really appreciate your efforts in helping me,
Best Regards,
Eurosoft

Lynne
11-10-2008, 02:46 PM
I thought ophan attachments get purged when one of the cleaners (a Scheduled Task) is run. I'd check those files (in includes/cron either cleanup or cleanup2). Also, have you run repair/optimize on the attachment table?