Moving content store

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

Moving content store

Hi there ,

I am trying to move file from default  content store to another content store  . I was using below script . But this copy file to storeB . Is there similiar script which basically move file to second content store?  Like Cut & Paste in windows .

After moving i dont need this in default location.

 

I was using following script , but this only copy the file.

var logFile = space.childByNamePath("alf docs1.txt");

logFile.addAspect("cm:storeSelector");
logFile.properties['cm:storeName'] = "storeB";
logFile.save();

 

5 Replies
Highlighted
Community Manager
Community Manager

Re: Moving content store

Can you provide a little more information? Are you moving from the same version to the same version? Is the alf_data viewable from the new server environment? You might not need all that you are doing.

Highlighted
Established Member

Re: Moving content store

Hi ,

 

I have two content store defined in content-store-selector-context.xml file .

First one is  default content store and another content store in different physical location(storeB) .   Once in month i need to move file into storeB location from default content store.  I will be planning to use scheduler which will invoke a script . script should move files from default to storeB. ( Not copying)

Both content store is viewable from same server.

Regards

 

 

Highlighted
Established Member

Re: Moving content store

Hi ,

In fact i was trying to follow approach mentoned in API doc docs.alfresco.com/5.2/concepts/store-using.html , it was mentioned that ': The original content created in the default store will still exist and will be linked to the copy in the new named store location. If you do not want this to occur, the cm:versionable aspect needs to be removed from the content before applying the cm:storeSelector aspect, and then re-applied after the cm:storeSelector aspect has taken affect.'

Highlighted
Alfresco Employee

Re: Moving content store

This feature is only Enterprise, are you using Enterprise?

Software Engineer in Alfresco Search Team.
Highlighted
Established Member

Re: Moving content store

Yes very  much  , we are using EE version of ACS 5.2 .   

Question is , once we move documents to new content store , old bin file is still exist as Orpan node . Looks like yes it is existing . So will it go through content lifecycle and archival process ?