News:

Wondering if this will always be free?  See why free is better.

Main Menu

A question about Attachment Directories

Started by sbartelski, March 13, 2024, 12:51:42 PM

Previous topic - Next topic

sbartelski

Short description of the situation.
I recently made a copy of our SMF forum in a separate folder on the server that we use. I created a separate SQL DB, copied the data and then loaded the database with a copy of the live DB. I then used repair_settings.php to update the settings for the new folders, URL, database name, etc.
Somewhere along the line the settings in the test copy got transferred to the live version, specifically the attachment directories. Yesterday I was alerted that a number of posts had dead links to their pictures. I was checking everything and that is when I discovered that the Attachment Directory as set in the test folder. I corrected that, hoping that the links would come alive, but no luck.

My question is, as the "test" folder is still listed in the live setting, but not 'in use', if I delete the "test" folder, when my testing is done, will SMF think that all those old images, going back many years, have disappeared.

When I look at the Attachment Stats (see below) the current directory seems relatively empty, although a FileZilla directory listing shows the directory is much bigger.

I have no idea about how the attachments process works, so I am not sure whether I can get out of this mess that I made, and hopefully how.

I would appreciate any advice that the gurus that live here can give me.

TIA

Stefan
You cannot view this attachment.You cannot view this attachment.
Stefan Bartelski
Webmaster for the Cadillac LaSalle Discussion forums

sbartelski

P.S. The four .dat directories are all empty, do they serve any purpose or can they be deleted?

And my version is 2.1.4
Stefan
Stefan Bartelski
Webmaster for the Cadillac LaSalle Discussion forums

Kindred

You have to run repair settings twice period once for the change to the basic URL and path And the database information and the second time for the change to all the database stored data like the attachments
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

If you've crosslinked the two installs you will likely lose any attachments that are posted until you straighten this out.  You should put the production forum into maintenance mode until it's fixed.

Quote from: sbartelski on March 13, 2024, 12:53:36 PMThe four .dat directories are all empty, do they serve any purpose or can they be deleted?

Any idea how they got there?

When in Emor, do as the Snamors.
                              - D. Lister

sbartelski

Thye got there through the issue with repair.settings, see a separate post. I can live with this for the moment. Thnanks for the reply
Stefan Bartelski
Webmaster for the Cadillac LaSalle Discussion forums

Sir Osis of Liver

repair_settings could not have created the .dat directories.  The .dat extension is added to attachment filename hash by 2.1 upgrader, has nothing to do with settings.  If you actually have over 63gb of attachments in one directory, it may have choked the server and caused it to do something strange.  It's also very bad practice.
When in Emor, do as the Snamors.
                              - D. Lister

Advertisement: