cancel
Showing results for 
Search instead for 
Did you mean: 

How to change location of contentstore dir?

alessio86
Champ in-the-making
Champ in-the-making

Hi, I was wondering how to save files on an external server (different from the installation one). After reading some community discussions, I have understood that:
1. I need to change the dir.contentstore and dir.contentstore.deleted default values in the alfresco-global.properties file. But I don't know how to select the right path to the destination folder. For example:
dir.contentstore = <server_address>\\C:\\contentstore

Is it the right way to write the path?

2. After doing point 1, do I need to delete or move or rename the old contentstore directories? And also, should I delete the database (because maybe I will get errors when looking for a file in another location).

3. Do I need to modify other configuration or xml files? Or do I need to perform some other actions?

Thanks in advance,

Alessio

1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

1) You need to specify the path to the directory in the way that you could also use as a fully qualified path on the console / shell. If you are running on WIndows you can use the UNC path or if you mounted a remote directory, you can also use the local mount drive.

2) If you only change dir.contentstore + _deleted, you need to move the contents of the old folders into the new location. You do not need to delete anything in the DB because all paths are stored relative to the contentstore.

3) If you only change dir.contentstore + _deleted, no other configuration needs to be changed.

Alfresco supports configuration of multiple content stores, so you could technically store content in multiple directories. Such a setup would require either extensive XML configuration or an addon such as Simple Content Stores.

View answer in original post

7 REPLIES 7

afaust
Legendary Innovator
Legendary Innovator

1) You need to specify the path to the directory in the way that you could also use as a fully qualified path on the console / shell. If you are running on WIndows you can use the UNC path or if you mounted a remote directory, you can also use the local mount drive.

2) If you only change dir.contentstore + _deleted, you need to move the contents of the old folders into the new location. You do not need to delete anything in the DB because all paths are stored relative to the contentstore.

3) If you only change dir.contentstore + _deleted, no other configuration needs to be changed.

Alfresco supports configuration of multiple content stores, so you could technically store content in multiple directories. Such a setup would require either extensive XML configuration or an addon such as Simple Content Stores.

alessio86
Champ in-the-making
Champ in-the-making

Thanks Axel, very clear. I'm currently using a linux environment for the alfresco installation location but I want to store contentdata on an external windows server. But while reading the documentation, I found that:

You can use a remote file system but you cannot use the UNC mapped network path with it, for example:

dir.contentstore=//server1/c/contentstore/contentstoredir.contentstore.deleted=//server1/c/contentstore/contentstore.deleted

You need to use a Windows or DOS path.

I read this here: Managing content stores | Alfresco Documentation  

So my problem is that I don't really understand how to write paths to an external server location.

I tried to use

dir.contentstore=//<my_server_ip>/c/new_content_dir

but it creates a new directory in my Linux server named <my_server_ip>. I know this should be easy but I'm stuck with it.

Any clues?

Thanks!

afaust
Legendary Innovator
Legendary Innovator

If you are on Linux, then you need to mount the UNC path first to a directory with a read/write capable file system driver. Then you configure the path with that mount point (and any sub-paths inside of it) with Alfresco.

dba100
Star Contributor
Star Contributor

but one thing, how to MIGRATE the existing content store to the NAS from local server  ?

npallewatta
Champ in-the-making
Champ in-the-making

I have used symlinks to point to my mapped nas partition iscsidms/contentstore and contentstore.deleted from /opt/alfresco6.2/alf_data. But once I changed it to a local folder it says

"08150019 Ensure that the 'dir.root' property '/opt/alfresco6.2/alf_data' is pointing to the correct data location"

For this i deleted previous symlinks I used and added new ones to my local storage in the same machine.

New to Alfresco.  Appreciate any support given to solve this.

-----------------------------------------------------------------

ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 08150019 Ensure that the 'dir.root' property '/opt/alfresco6.2/alf_data' is pointing to the correct data location.
at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:212)
at org.alfresco.repo.admin.ConfigurationChecker.access$0(ConfigurationChecker.java:167)
at org.alfresco.repo.admin.ConfigurationChecker$1$1.doWork(ConfigurationChecker.java:155)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:602)
at org.alfresco.repo.admin.ConfigurationChecker$1.execute(ConfigurationChecker.java:151)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:338)
at org.alfresco.repo.admin.ConfigurationChecker.onBootstrap(ConfigurationChecker.java:161)
at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:221)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:186)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:206)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5278)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:629)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Sep 15, 2020 4:39:46 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class [org.alfresco.web.app.ContextLoaderListener]
org.alfresco.error.AlfrescoRuntimeException: 08150019 Ensure that the 'dir.root' property '/opt/alfresco6.2/alf_data' is pointing to the correct data location.

alessio86
Champ in-the-making
Champ in-the-making

Ok I got it. I was missing the part that I need to share a directory from my external server. It was my lack of experience. Thanks!

Hi Alessio Izzo. Well right now i am in the same problem, my alfresco is installed in linux and i want to change content store into a nas windows server, so i will so grateful if you help me and show me what steps did you take.