alfresco:sitestore

Alfresco :: Separate Store for Each Site

  1. Shutdown Alfresco service
  2. Create database backup and alf_data folder backup
  3. Create backup of alfresco.global.properties
  4. Create backup of all egov servlet context configuration (<tomcat>/conf/Catalina/localhost/*.xml)

1 Install Acosix Alfresco Utility extension to repo side

        java -jar alfresco-mmt.jar install de.acosix.alfresco.utility.core.repo-1.2.5.amp <tomcat/webapps>/alfresco.war -verbose

2. Install Acosix Alfresco Utility extension to share side

        java -jar alfresco-mmt.jar install de.acosix.alfresco.utility.core.share-1.2.5.amp <tomcat/webapps>/share.war -verbose

3. Install Acosix Simple Store extension to repo side

        java -jar alfresco-mmt.jar install de.acosix.alfresco.simplecontentstores.repo-1.1.1-SNAPSHOT.amp <tomcat/webapps>/alfresco.war -verbose
  1. Shutdown Alfresco
  2. Append the following configuration items inside the <tomcat>/shared/classes/alfresco.global.properties
#---------------------------------------------------------------------------------------------------------
# Site Content Store routing
simpleContentStores.enabled=true

# declare site stores
simpleContentStores.rootStore=siteMappedStore
simpleContentStores.customStores=siteMappedStore,defaultFileStore,site01FileStore,site02FileStore,site03FileStore,site04FileStore

simpleContentStores.customStore.siteMappedStore.type=siteRoutingStore
simpleContentStores.customStore.siteMappedStore.value.moveStoresOnNodeMoveOrCopy=true
simpleContentStores.customStore.siteMappedStore.ref.fallbackStore=defaultFileStore

# map site ID to site store
simpleContentStores.customStore.siteMappedStore.map.storeBySite.ref.site01=site01FileStore
simpleContentStores.customStore.siteMappedStore.map.storeBySite.ref.site02=site02FileStore
simpleContentStores.customStore.siteMappedStore.map.storeBySite.ref.site03=site03FileStore
simpleContentStores.customStore.siteMappedStore.map.storeBySite.ref.site04=site04FileStore

# default store
simpleContentStores.customStore.defaultFileStore.type=standardFileStore
simpleContentStores.customStore.defaultFileStore.value.rootAbsolutePath=${dir.contentstore}
simpleContentStores.customStore.defaultFileStore.value.protocol=store

# site store 01
simpleContentStores.customStore.site01FileStore.type=standardFileStore
simpleContentStores.customStore.site01FileStore.value.rootAbsolutePath=${dir.root}/store01
simpleContentStores.customStore.site01FileStore.value.protocol=store01

# site store 02
simpleContentStores.customStore.site02FileStore.type=standardFileStore
simpleContentStores.customStore.site02FileStore.value.rootAbsolutePath=${dir.root}/store02
simpleContentStores.customStore.site02FileStore.value.protocol=store02

# site store 03
simpleContentStores.customStore.site03FileStore.type=standardFileStore
simpleContentStores.customStore.site03FileStore.value.rootAbsolutePath=${dir.root}/store03
simpleContentStores.customStore.site03FileStore.value.protocol=store03

# site store 04
simpleContentStores.customStore.site04FileStore.type=standardFileStore
simpleContentStores.customStore.site04FileStore.value.rootAbsolutePath=${dir.root}/store04
simpleContentStores.customStore.site04FileStore.value.protocol=store04

#---------------------------------------------------------------------------------------------------------
  1. Startup Alfresco
  2. Login as admin
  3. Create four private sites
    1. Site ID: site01, Name: PIDSG e-Gov Live
    2. Site ID: site02, Name: PIDSG e-Gov Dev
    3. Site ID: site03, Name: PIDSG-BT e-Gov Live
    4. Site ID: site04, Name: PIDSG-BT e-Gov Dev
  4. Create four user accounts for each site
    1. user: site01_admin, password: site01_admin, as Manager of site01
    2. user: site02_admin, password: site02_admin, as Manager of site02
    3. user: site03_admin, password: site03_admin, as Manager of site03
    4. user: site04_admin, password: site04_admin, as Manager of site04
  5. Make sure that each site account can access its own site, and can't access other sites
  1. Login to each site with corresponding Site Manager account
  2. Upload some files
  3. Verify those files are located in the designated store in the filesystem
  1. In Alfresco, open My Files > Sites
  2. Move all folders from site legal-dev > documentLibrary, to site03 > documentLibrary
  3. Move all folders from site egov-sg > documentLibrary, to site01 > documentLibrary
  4. Move the file list of calibration attachment from site03 to site04 (134 files)
  5. Make sure each sites has folder named UPLOADPOOL, take note the object ID
  1. Open the servlet context config of each app
  2. Create a backup copy
  3. Change the user access account, password and pool folder ID for each e-Gov sites.
  • alfresco/sitestore.txt
  • Last modified: 2021/04/17 16:33
  • by jmerari