Migrate attachment store?

Hello,
We have XWiki 13.10.2 installed on Debian Linux 10.11. It was upgraded from an old version.
Actually we have attachment storage configured as follows:
xwiki.store.attachment.hint = hibernate
This configuration has come from an old version.
Now we would like to be able to save some large files as attachments, so we need to migrate to filesystem attachment store.
How should we proceed to be able to access the attachments currently present in XWiki?
If I simply try to change the storage type and path - I cannot access to the old files.
Peter

Changing xwiki.store.attachment.hint value is not a problem at all in 13.10.2. This property only apply to new attachments and the old ones have the store type indicated in the attachment metadata in database (but before 10.2 it was indeed controlling the store to use for all attachments).

Switching this property to file is technically what happen every time an XWiki instance older than 10.2 (where storage configuration is not customized in xwki.cfg) is upgraded. Old attachments content remain in the database and new ones get stored on filesystem.

What exactly do you mean by that ?

What exactly do you mean by that ?

At the same time I tried to set:
store.file.directory=/var/opt/xwiki/data

…and I’ve got many errors like this:
file /var/opt/xwiki/data/xwiki/3/1/0cbcf56eceed736521098d03100bd9/attachments/c/8/76f09ff0decfcfdb26438d18f21e41/f.png could not be found in the filesystem attachment store.:

Why ?

As indicated in xwiki.properties its value is, by default, ${environment.permanentDirectory}/store/file.

That’s not a database attachment but a filesystem attachment as suggested by the path in the error, and it cannot be found in the location you configured, most probably because it’s actually in the previous location.

By changing the filesystem store location, you broke all attachments that were already in the filesystem store. Which seems you indicate that this is already how attachments were configured, are you really sure xwiki.store.attachment.hint was uncommented ? Of course, it’s possible that you used to have both filesystem and database attachments if you upgraded from version which was at least 10.2.

In any case, I really don’t see why you would need to change the attachment store location specifically. If you want filesystem store attachments (which is the default since 10.2) you should probably reset the whole Storage section related to xwiki.store.* properties in the xwiki.cfg file to the standard version to come back to a cleaner state.

Thanks a lot for your assistance.
Indeed, the actual storage IS filesystem, so I’ve changed the location and the system could not find the attachments.
Probably, we just have a problem of size limit, I’ll try to unlock it everywhere…