cancel
Showing results for 
Search instead for 
Did you mean: 

Moving content store

brijeshnk
Star Contributor
Star Contributor

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 5

jljwoznica
Star Collaborator
Star Collaborator

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.

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

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.'

This feature is only Enterprise, are you using Enterprise?

Hyland Developer Evangelist

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 ?