How to change location of contentstore dir?

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
alessio86
Member II

How to change location of contentstore dir?

Jump to solution

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 Solution

Accepted Solutions
afaust
Master

Re: How to change location of contentstore dir?

Jump to solution

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.

5 Replies
afaust
Master

Re: How to change location of contentstore dir?

Jump to solution

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
Member II

Re: How to change location of contentstore dir?

Jump to solution

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
Master

Re: How to change location of contentstore dir?

Jump to solution

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.

alessio86
Member II

Re: How to change location of contentstore dir?

Jump to solution

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!

luis000
Active Member

Re: How to change location of contentstore dir?

Jump to solution

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.