Monday, May 7, 2012

Export ACP from the Alfresco Store

Have you ever tried to export groups and people from an Alfresco Store?
Everytime I do this, it is a pain in the ass. you have to shutdown the server and then struggle to find the right command line to perform the export.
I get errors like javax.servlet exception or PermGen space and other ClassNotFound... It is a waste of time.
Here is the command line I use. I tried to clean it as much as possible.
It runs on an Ubuntu server with tomcat6 installed.

TOMCAT/webapps/alfresco/WEB-INF$sudo service tomcat6 stop
# Wait a bit that tomcat has been really shutdown.
TOMCAT/webapps/alfresco/WEB-INF$sudo java -XX:MaxPermSize=512m -classpath `locate servlet-api.jar`:classes/alfresco/module:classes:lib/* org.alfresco.tools.Export -user <MyUser> -pwd <MyPassword> -s workspace://SpacesStore -verbose -p /sys:system/sys:authorities  -d /tmp authorities.xml
TOMCAT/webapps/alfresco/WEB-INF$sudo service tomcat6 start

The official wiki page should also now be up to date: http://wiki.alfresco.com/wiki/Export_and_Import#Export_Tool