AnsweredAssumed Answered

Cannot import workspace://spacesStore repository with ACP

Question asked by jevon on Mar 8, 2012
Latest reply on Apr 21, 2012 by mittromney
Hi all,

I'm having difficulties using the ACP export/import feature of Alfresco as a way to backup and restore an Alfresco repository. This is a fairly empty repository on a local dev machine - the entire repository is only about 40MB.

I've exported the workspace://SpacesStore repository using the following command, as described at

java -Xms128m -Xmx768m -XX:MaxPermSize=256m -classpath ../../lib/*;../../lib/ext/*;../../shared/classes;WEB-INF/classes/;../../shared/lib/*;WEB-INF/lib/* -user admin -pwd admin -store workspace://SpacesStore -verbose c:/hubnet/temp/workspace-spacesStore.xml

This creates workspace-spacesStore.xml and a folder workspace-spacesStore which contains all of the raw files.

To import the workspace, I've deleted the existing Alfresco database and the old Alfresco data. I then try to import the same workspace using the command:

java -Xms128m -Xmx768m -XX:MaxPermSize=256m -classpath ../../lib/*;../../lib/ext/*;../../shared/classes;WEB-INF/classes/;../../shared/lib/*;WEB-INF/lib/* -user admin -pwd admin -store workspace://SpacesStore -verbose c:/hubnet/temp/workspace-spacesStore.xml

Since the database and alf_data folders do not exist, they are created and initialised (I think). The import is subsequently not successful, and the following exception occurs:

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '6-wf-email-html-ftl' for key 'store_id'
; SQL []; Duplicate entry '6-wf-email-html-ftl' for key 'store_id'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationExcepti
on: Duplicate entry '6-wf-email-html-ftl' for key 'store_id'

If I use the argument -uuidBinding REPLACE_EXISTING, the same exception occurs.

If I use the argument -uuidBinding REMOVE_EXISTING, I get the following exception instead:

org.alfresco.error.AlfrescoRuntimeException: 02070017 site deletion is not allowed. Attempted to delete workspace://SpacesStore/b4cff62a-664d-4d45-9302-98723eac1319

If I use the argument -uuidBinding UPDATE_EXISTING, I get the following exception instead:

org.alfresco.service.cmr.rendition.RenditionServiceException: 02080017 Multiple rendition definitions with the name: {}doclib exist!

Therefore I've run out of options. How are you supposed to import an ACP file into a new repository? I haven't had any success at all.

I've also not been able to import the user://alfrescoUserStore, system://system or workspace://lightWeightVersionStore repositories. The only repository I've had success in importing is the archive://SpacesStore repository, but since none of my workspace changes affect this repository, it's effectively useless. This is Alfresco Community 4.0.c.

Any ideas or feedback would be most welcome. Right now my backup/restore approach is through dumping the database through mysqldump, and copying the data itself using rsync. At least with mysqldump & rsync you can backup a running Alfresco instance.