XF 1.5 Will old attachment thumbnails automatically get cleaned up?

jeffwidman

Active member
I'm switching VPS providers.

1) Ran initial rsync with board open
2) Half an hour later, I closed the board and dumped the db
3) Import the db on the new box, re-opened the board, and start rebuilding elasticsearch cache. Will I'm in there, I figure I might as well rebuild the other caches just in case, so clicked rebuild attachment thumbnails.
4) Flip the DNS, re-open the board.
5) An hour later, realized I forgot to do a final rsync for anything uploaded between my initial rsync and when I closed the board.
6) Re-run rsync from old server to new server. A bunch of attachment files come across--definitely more than would have been uploaded by my users in this period of time.

So I'm thinking when I ran the 'rebuild attachment thumbnails' it cleaned out a bunch of old files that I then accidentally rsync'ed across again.

Will these files get cleaned up somehow? Or are they now orphans in my filesystem since any reference to them would have been deleted in the initial attachment cache rebuild...
 
How do I identify them in order to delete them?

The rsync list of files was fairly big and scrolled by so fast that it ran out of the terminal history and I can't retrieve it.
 
There isn't really an easy way.

You would have to compare the first set of digits of the attachment file name with the data_id in the xf_attachment table and delete any which aren't in the table.

Other than taking up storage space, it won't have any effect on the site.
 
Were the big chunk of files rsynced to the data folder?

The ones I see still in my terminal view are of the form: forum/data/attachments/3/3020-5493a8988fbd199f6ca6450e0cb9a496.jpg

You would have to compare the first set of digits of the attachment file name with the data_id in the xf_attachment table and delete any which aren't in the table.

Is there a way to delete just the thumbnails, since those can be rebuilt via the ACP? For example, are there different subfolders for the actual attachments vs the thumbnails?
 
Top Bottom