Move storage backend

Hi

My /opt/indico/archive is getting full. I would like to move the whole contents to another place.

STORAGE_BACKENDS = {'default': 'fs:/nfs/hepfs/indico-archive', 'readonly': 'fs-readonly:/opt/indico/archive', 'legacy': 'fs-readonly:/nfs/hepfs/legacy-archive'}
ATTACHMENT_STORAGE = 'default'

However, I can’t see to access the /opt/indico/archive in some of the events’ attachments. I think that readonly is not the correct syntax. May I know where I can find the documentation on the syntax? Thank you

Jacky

You cannot rename an existing storage backend. You need to keep the existing name (since it’s referenced in the database), and then add a NEW storage backend for future files, e.g. default-2025 or whatever you want.

ATTACHMENT_STORAGE then needs to point to the current one to which new files should be written.

Hi,

Thank you for he clarification. Is my syntax correct in the first post? Am I suppose able access the /opt/indico/archive events’ attachments?

I pointed the /opt/indico/archive as a soft link to the new directory after copied its contents over. Maybe that’s not the best way to do it.

Jacky

It’s not very clear what your initial settings were, so it’s hard to give you a concrete piece of code to put in your config.

What you need to do is stick with the initial STORAGE_BACKENDS config, and change the path that pointed to /opt/indico/archive to the new location where you copied the files.

If you want to keep writing to that location, no additional changes are needed.

If you want to write new files to a different location, add a new entry to STORAGE_BACKENDS, and set ATTACHMENT_STORAGE to that key of that entry.