StaticSync

ResourceSpace file storage (filestore)

ResourceSpace stores resource files in obfuscated folder paths on the server and not in the database.

The folders are not meaningful to an administrator browsing the folders on the server because they are derived from the unique resource ID and are not related in any way to metadata or collections that the resources belong to.

The files are normally located in a directory named 'filestore' located in the root of your ResourceSpace root folder, although there are a number of configuration options that can alter this (e.g. $storagedir and $originals_separate_storage)

Historically resources have been distributed in an uneven fashion throughout the filestore. Resources with IDs beginning with 1 will be located below filestore/1, resources beginning with 2 will be located under filestore/2 etc. As a result most systems have a far greater number of resources located in the lower numbered folders and this has made it difficult for server administrators to separate the filestore in order to spread it over a number of drives

From version 9.2 onwards ResourceSpace allows you to change this by setting the configuration option below. This setting will be enabled by default for new installations

$filestore_evenspread = true;

To ensure that existing resource files are still accessible :-

  1. Set the configuration option below
    $filestore_migrate=true;
  2. Run the following PHP script from a terminal or command prompt on the server. This will move the resource files into the new locations. Amend the actual command as necessary to suit your specific server configuration
    /pages/tools/filestore_migrate.php
    
    e.g.
    
    php /var/www/pages/tools/filestore_migrate.php