Import export utenti e gruppi

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

Import export utenti e gruppi

Ciao

dovrei effettuare un aggiornamento di una installazione di alfresco 2.1 alla 3.3 installata su macchina apple intel con leopard, e database postgresql con circa 10000 files nel repository

effettuando gli step di aggiornamento, dopo una serie di errori, aggiorna correttamente il db ed il filesystem, ma l'applicazione in alcune funzionalità presenta degli errori.
Per cui ho deciso di effettuare anche una nuova installazione e di importare al suo interno i contenuti dell'aggiornamento..


Utilizzando le classi di Import ed Export ho ottenuto i files xml che contengono i miei utenti, ed i miei gruppi
ho seguito questa procedura
1. Export the users from the user://alfrescoUserStore. This will generate an alfrescoUserStore-people.xml file. Command: export -user admin -pwd <PROTECTED> -s user://alfrescoUserStore -path /sys:system/sys:people -verbose alfrescoUserStore-people
2. Remove the 'admin' account from alfrescoUserStore-people.xml
3. Export the groups from the user://alfrescoUserStore. This will generate an alfrescoUserStore-authorities.xml file. Command: export -user admin -pwd <PROTECTED> -s user://alfrescoUserStore -path /sys:system/sys:authorities -verbose alfrescoUserStore-authorities
4. Export the users from the workspace://SpacesStore. This will generate an spacesstore-people.xml file. Command: export -user admin -pwd admin -s workspace://SpacesStore -p /sys:system/sys:people -verbose spacesstore-people
5. Remove the <cm:person> element for the "admin" and "guest" accounts from the spacesstore-people.xml file.
6. Copy alfrescoUserStore-people.xml, alfrescoUserStore-authorities.xml and spacesstore-people.xml to the target Alfresco system.
7. Import the users into user://alfrescoUserStore. Command: import -user admin -pwd <PROTECTED> -s user://alfrescoUserStore -p /sys:system/sys:people -uuidBinding UPDATE_EXISTING -verbose alfrescoUserStore-people
8. Import groups into user://alfrescoUserStore. Command: import -user admin -pwd <PROTECTED> -s user://alfrescoUserStore -p /sys:system/sys:authorities -uuidBinding UPDATE_EXISTING -verbose alfrescoUserStore-authorities
9. Import users into workspace://SpacesStore. Command: import -user admin -pwd <PROTECTED> -s workspace://SpacesStore -p /sys:system/sys:people -uuidBinding UPDATE_EXISTING -verbose spacesstore-people
10. Restart Alfresco where the users were imported.

ottengo però questo errore, nel passaggio 8
Alfresco Repository Importer
Connected as admin
Time to login 68.63162 seconds
Importing from package /Users/michele/Desktop/alfrescoUserStore-authorities.xml
Failed to import package due to Path /sys:system/sys:authorities within node user://alfrescoUserStore/4bb26ad0-f037-41fd-aee8-1fa7e085a532 does not exist - the path must resolve to a valid location caused by: Path /sys:system/sys:authorities within node user://alfrescoUserStore/4bb26ad0-f037-41fd-aee8-1fa7e085a532 does not exist - the path must resolve to a valid location
org.alfresco.tools.ToolException: Failed to import package due to Path /sys:system/sys:authorities within node user://alfrescoUserStore/4bb26ad0-f037-41fd-aee8-1fa7e085a532 does not exist - the path must resolve to a valid location
   at org.alfresco.tools.Import.execute(Import.java:229)
   at org.alfresco.tools.Tool.start(Tool.java:226)
   at org.alfresco.tools.Import.main(Import.java:60)
Caused by: org.alfresco.service.cmr.view.ImporterException: Path /sys:system/sys:authorities within node user://alfrescoUserStore/4bb26ad0-f037-41fd-aee8-1fa7e085a532 does not exist - the path must resolve to a valid location
   at org.alfresco.repo.importer.ImporterComponent.getNodeRef(ImporterComponent.java:261)
   at org.alfresco.repo.importer.ImporterComponent.importView(ImporterComponent.java:227)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:43)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:135)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy83.importView(Unknown Source)
   at org.alfresco.tools.Import.execute(Import.java:225)
   … 2 more

da quanto leggo in giro, pare che il path /sys:system/sys:authorities non esiste..


non so più che fare.. ho provato di tutto.. anche utilizzando le api, ma non riesco ad ottenere il risultato sperato..


Qualcuno saprebbe indicarmi la procedura corretta per effettuare questo import export delle utenze e dei gruppi?


Grazie
3 Replies
kaiou
Member II

Re: Import export utenti e gruppi

Aggiornamento:
questi step (a parte l'8..) importano correttamente gli users.. ma ho bisogno anche dei gruppi…
joe_l3
Active Member II

Re: Import export utenti e gruppi

Ciao,
il problema è dovuto al fatto che dalla versione 3.2 in poi, Alfresco ha cambiato lo store per il path "/sys:system/sys:authorities" contenente le informazioni relative ai Gruppi. Se provi a navigare da "Node Browser" puoi trovare quel path nello store "workspace://SpacesStore".
Nel tuo caso, devi modificare il tuo script sia di export che di import per i Gruppi, passando al parametro -s[tore] non più user://alfrescoUserStore ma "workspace://SpacesStore". Puoi provare con qualcosa tipo questo:

export -user admin -pwd *** -s workspace://SpacesStore -path /sys:system/sys:authorities -verbose -overwrite gruppi
import -user admin -pwd *** -s workspace://SpacesStore -path /sys:system/sys:authorities -verbose -uuidBinding UPDATE_EXISTING gruppi
Tuttavia, una volta completato l'import, anche se i gruppi sono presenti sulla base di dati, probabilmente non li vedrai ancora se accedi alla console  "Manage User Groups" . Nel caso si presentasse quest'anomalia prova a dare un'occhiata a questo link: http://forums.alfresco.com/en/viewtopic.php?f=6&t=26721

joe.l3
mturatti
Member II

Re: Import export utenti e gruppi

Per quanto riguarda la versione Enterprise di Alfresco, esistono degli upgrade path consigliati. Non posso garantire che siano al 100% validi anche per la Community, ma in generale saltare direttamente da una 2.1 ad una 3.3 non è automatico:

Alfresco upgrade paths

When you upgrade Alfresco, it is recommended that you follow a structured upgrade path between versions.
The following list shows the supported upgrade paths:
•   Version 2.1.x to Version 2.1.7 to Version 3.1.x
•   Version 2.2.x to Version 2.2.4 to Version 3.1.x
•   Version 2.1.x to Version 2.1.7 to Version 3.2.x
•   Version 2.2.x to Version 2.2.5 to Version 3.2.x
•   Version 3.1.x to Version 3.2.x

For example, if your production environment currently runs Alfresco Version 2.2.1, you need to upgrade to Version 2.2.4 before you can upgrade to Version 3.1.x.