Package org.cyclos.impl.storage.utils
Class StoredFileContentMigrator
- java.lang.Object
-
- org.cyclos.impl.storage.utils.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 thecyclos.propertiesfile 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 Summary
Constructors Constructor Description StoredFileContentMigrator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)protected voidmigrate(StoredFile storedFile)
-
-
-
Method Detail
-
main
public static void main(String[] args)
-
migrate
protected void migrate(StoredFile storedFile)
-
-