Accidentally deleted my OJS installation folders and /files (!)

Hi,
I run an OJS 2.4.8
I’ve accidentally deleted my whole /OJS directory, including the /files directory, which was in it.
My hosting provider says no backup of the files exist, as the account was overloaded.
The database is ok. This was not deleted.
My intended procedure is:

  • Upload a new 2.4.8
  • Edit the config.inc.php
  • Restore a /files directory backup copy which I keep on my PC (dated dec 2015)
  • The journal chief editor will ask all contributors to re-send all lost files, i.e., those files uploaded into the journal starting from dec 2015.
    Is there a way to ease this up? Does the OJS database hold some sort of record that can help somehow? Any other sugestion or thing to be taken into account?
    Thanks very much in advance.
    Regards,
    Juan

Hi @jascanio,

Sorry to hear this has happened! Your plan sounds OK to me – you’ll also need to consider the public files directory, which will contain e.g. cover images and logos.

The database will contain a listing of all files that are supposed to be in the flies_dir. This is stored in the article_files table; you can use that to determine what files are missing.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi asmecher,
Thanks for your reply and advice.
I’ll get on the issue and let you know how I’m doing.
Thanks again for your help.
Regards,
Juan

Hi @asmecher,
I’ve set up a new 2.4.8. The whole installation seems to work fine, but with 10 months of files missing, as expected.
I’ve placed now the /files folder out of the public_html directory and edited the config.inc.php accordingly.
Got two questions:

  1. Does having the /files directory out of the installation (it was inside before) be disruptive as it always was inside?
  2. Is there a way by a SQL query or other mechanism to plot out what user submitted what file? (We would use this to request resubmission of files to users individually by mail. We would name files then as in the article_files table and upload them again via FTP individually to its location)

Thanks in advance fo your help.
Best,
Juan

Hi @jascanio,

  1. The files directory should be outside of the web root for security reasons. (See e.g. docs/README, under “Recommended Configuration”.) As long as you specify the right files_dir in your config.inc.php configuration file, OJS will work with the files in that location.

  2. It’s not trivial (this is much more clearly defined in OJS 3.0), but you can generally intuit the uploader by looking at the suffix (-SM, -RV, -CE, etc). Have a look at classes/file/ArticleFileManager.inc.php, particularly the fileStageToPath and fileStageToAbbrev functions.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
Ok. Thanks for your reply
Regards,
Juan