cancel
Showing results for 
Search instead for 
Did you mean: 

Import whole repository

rludvig
Champ in-the-making
Champ in-the-making
I am using Alfresco 1.1.2 (latest stable release) and have attempted to import an ACP file which contains an entire repository (the equivalent of a backup, created using the "repository root" option from the export menu of the web interface) but have failed. These are the steps that I performed:

1. Export and save the ACP file using the web client (selected "repository root" option).

2. Remove the alf_data folder.

3. Remove the existing database and create a new one (using the remove and setup scripts).

4. Run the importer on the ACP file with admin/admin credentials.

This is the output of the import tool:

14:14:41,796 INFO  [service.descriptor.DescriptorService] Alfresco started (Open
Source) - v1.1.2; repository v1.1.2
The following error has occurred:
Bad credentials presented
org.alfresco.repo.security.authentication.AuthenticationException: Bad credentia
ls presented
        at org.alfresco.repo.security.authentication.AuthenticationComponentImpl
.authenticate(AuthenticationComponentImpl.java:69)
        at org.alfresco.repo.security.authentication.AuthenticationServiceImpl.a
uthenticate(AuthenticationServiceImpl.java:93)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
on(AopUtils.java:287)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
inpoint(ReflectiveMethodInvocation.java:155)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:122)
        at org.springframework.transaction.interceptor.TransactionInterceptor.in
voke(TransactionInterceptor.java:57)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:144)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:174)
        at $Proxy19.authenticate(Unknown Source)
        at org.alfresco.tools.Tool.login(Tool.java:182)
        at org.alfresco.tools.Tool.start(Tool.java:147)
        at org.alfresco.tools.Import.main(Import.java:54)
Caused by: net.sf.acegisecurity.BadCredentialsException: Bad credentials present
ed
        at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.getUserF
romBackend(DaoAuthenticationProvider.java:393)
        at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenti
cate(DaoAuthenticationProvider.java:225)
        at net.sf.acegisecurity.providers.ProviderManager.doAuthentication(Provi
derManager.java:159)
        at net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(Abstr
actAuthenticationManager.java:49)
        at org.alfresco.repo.security.authentication.AuthenticationComponentImpl
.authenticate(AuthenticationComponentImpl.java:63)
        … 15 more

After peeking in the Import and the ContextListener class, I conclude that the normal way to bootstrap a repository is to create it first and then create the admin user and assign him the permissions on that repository. This of course presents a problem with the import of an entire repository.

I also tried to start Alfresco in order to bootstrap the repository, but a subsequent import of a repository root, although successful, would then generate a duplicate company home problem.

Do you have a solution for this particular scenario ??

As a side note, importing also failed when documents were categorised. The categories were not found, although they were declared in the xml file inside the ACP archive, before the files that would reference them.
4 REPLIES 4

davidc
Star Contributor
Star Contributor
The only way to completely backup your repository is take a backup of the database and alf_data directories.

Post v1.2, we'll provide a full backup and restore via .acp files.

assamese
Champ in-the-making
Champ in-the-making
David,


When will the 'full backup and restore via .acp files' be available ? Any timeframe ?
Will it be available in the open-source version ?
Does 'a full backup and restore via .acp files' mean that separate beckups for data-files & the database will not be necessary ?

Thanks in advance - Mike.

davidc
Star Contributor
Star Contributor
Available in v1.3 (open source).  It will provide an alternative to database/alf_data backup, but will not provide incremental support etc.

assamese
Champ in-the-making
Champ in-the-making
David, Thanks for your response. Just to re-confirm:

The new backup to be available in 1.3 will do away with having to keep  separate beckups for data-files & the database, right ?

Thanks in advance - Sanjay