Class StoredFileContentMigrator


  • public class StoredFileContentMigrator
    extends Object
    This utility class can be used, for example, if you have a running Cyclos server using the database as the storage for the content of the files and you want to start to use another one (for example Amazon S3 or the files system).
    To run the migrator you must have in the cyclos.properties file the required configurations for both storages: the current storage (to read the content from) and the new one to be used (to write the content to).
    This class only requires one parameter: for the built-in implementatios its alias and for custom implementation its fully qualified class name.
    To execute it just open a terminal go to the folder containing the Cyclos web application an issue the following command:
    java [-Dbatch.size=] [-Djobs=] -cp "WEB-INF/classes:../../lib/*:WEB-INF/lib/*" org.cyclos.impl.storage.utils.StoredFileContentMigrator [alias | <fully-qualified-class-name>]

    It is strongly recommended to backup the database before migrate the file's contents.

    • Constructor Detail

      • StoredFileContentMigrator

        public StoredFileContentMigrator()
    • Method Detail

      • main

        public static void main​(String[] args)
      • migrate

        protected void migrate​(StoredFile storedFile)