Storage backend ignored?


I have the storage on a separate partition. I thus use the:

STORAGE_BACKENDS = {‘default’: ‘fs:/data/archive’}

line. However, after upgrading to 2.3 I realized that all the recent events still have their data in /opt/indico/archive even though I have had the storage_backend configured for a long time (one year probably).

now on 2.3, indico searches for files in /data/archive as expected but does not find anything there as everything is on the other side.

Can I move evrything to /data/archive safely or is there another configuration option that I missed ?



Sounds like you didn’t reload uwsgi after changing this.

Also, keep in mind that if you just change the path you have to move/copy all existing files. Alternatively you can add another key, point to it in the ATTACHMENT_STORAGE setting. That way you keep anything existing in the old location, and anything new will go to the new one.

Anyway, if you do move everything and change the path in the STORAGE_BACKENDS setting this should work fine. The only thing stored in the database is the backend name and the path relative to the backend.

I see now that after reloading uwsgi new events go to the expected folder.

I rsynced the “lost” events to the right place.

Thanks a lot for you extremely quick answer !


Hi again.

I just realized that while the events are now created and attachement stored in the right place, when trying to read an attachment I get a 404.

For instance trying to read:


the file looks there:

# ls -lrth /data/archive/event/4067/event/
total 68K
-rw-r----- 1 indico apache 65K Sep 25 11:55 3107-2560-desktop.pdf

but I can’t read it.

relevant indico.conf:

STORAGE_BACKENDS = {'default': 'fs:/data/archive', 'legacy': 'fs-readonly:/data/legacy-archive'}

wsgi was reloaded following your previous advice.

Check your webserver log file; might be a problem with xsendfile. The default config will not allow sending files from outside /opt/indico. Since you use Apache you simply need to add another XSendFilePath line to the config that allows sending files from /data/archive.

1 Like