4.6. File Storage

Warning

You are looking at documentation for an older release. Not what you want? See the current release documentation.

In order to store binary files uploaded by users (such as attachments, documents or profile pictures) eXo Platform needs a file storage subsystem. There are two supported methods to perform file storage:

Note

You should choose either to store binary data in the database or through file system by setting the suitable value to the variable exo.files.binaries.storage.type. Choosing one file storage than the other depends on your data type and size.

Warning

Note that in case of using database as file storage, binary files are stored in the database table FILES_BINARY however in case of using file system storage, binary files are loaded from a folder of files. If you choose to store data through file system then you want to change to database or vice versa, note that you will lose data files because the source of binary files is different in the two cases. Consequently, you should choose the suitable file storage. if you absolutely need to migrate from rdbms to fs or vice versa, you need to implement a migration tool allowing to maintain your binary files.

File System storage

Note

The supported file system in eXo Platform is NTFS.

RDBMS storage

Storing files in the database has many advantages such as:

Comparing file system and RDBMS storage

FeatureRDBMSFile system
Transaction support: This feature is needed in case of concurrent access to the same dataset.A basic feature provided by all databases.Most of file systems don't have this feature. Transactional NTFS(TxF), Sun ZFS, and Veritas VxFS, support this feature. With eXo Platform transaction is managed at application level.
Fast indexing: It helps fast retrieval of data.Databases allow indexing based on any attribute or data-property (i.e SQL columns).This is not offered by most of file systems.
Consistency checkIt is feasable by all databases.File systems also support data consistency check.
Clean unused dataPossible with database.File system also ensure data cleanup.
ClusteringAdvanced databases offer clustering capabilities (such as Oracle and Mysql).File systems still don’t support this option (The only exceptions are Veritas CFS and GFS.
ReplicationIt is a commodity with databases.File systems provide replication feature but still need evolution.
Relational View of DataDatabases offer easy means to relate stored data. It also offers a flexible query language (SQL) to retrieve the data.File systems have little or no information about the data stored in the files because it stores files in a stream of bytes.

Note

When using eXo Platform in cluster mode and choosing to use file system for binary files storage, the files folder should be shared between all the cluster nodes.

File storage data backup requirements

Note

To back up data, eXo Platform should be stopped.

In case of file system storage, to make the binary files backup, you need to:

Warning

In case of using the database for file storage, the tables related to file storage are: FILES_BINARY, FILES_FILES, FILES_NAMESPACES and FILES_ORPHAN_FILES, but you should backup the whole database since there are links between these tables and other eXo Platform tables.

For more details about data backup in general, you can take a look on the section Backup and Restore.

Configuration

Some parameters are configurable in exo.properties. More details could be found File Storage Configuration.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus