| This document has been deprecated (as of 16th of February 2006). Please see this document instead. |
All versions of Confluence up to and including 2.0.x made use of a component called OSUser to store and manage users. We've written our own component to do this and its called Atlassian-User.
The two main reasons for migrating over to Atlassian-User are:
- If you want to take advantage of the new Atlassian-User-LDAP-Integration
- Atlassian-User is more performant than OSUser
Please follow these steps to migrate your users:
- Make a backup of your:
- database
- Confluence home directory
- confluence/WEB-INF/classes/atlassianUserContext.xml (only if you have made changes)
- Download hibernate_osuser_atlassianUserContext.xml and rename to atlassianUserContext.xml and copy to your confluence/WEB-INF/classes directory (you can overwrite the one that's there)
- Now uncomment the osuserMigrationBean in confluence/WEB-INF/classes/upgradeSubsystemContext.xml
<!-- To be used. optionally, to transfer ouser data to another repository. See osuser2atluser.jsp --> <bean id="osuserMigrationBean" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager"> <ref bean="transactionManager"/> </property> <property name="target"> <ref local="osuserMigrationBeanTarget"/> </property> <property name="transactionAttributes"> <props> <prop key="*">PROPAGATION_REQUIRED</prop> </props> </property> <property name="proxyInterfaces"> <value>com.atlassian.user.util.migration.EntityMigrator</value> </property> </bean> <bean id="osuserMigrationBeanTarget" class="com.atlassian.user.util.migration.OSUEntityMigrator"> <constructor-arg index="0"> <ref bean="hibernateUserManager" /> </constructor-arg> <constructor-arg index="1"> <ref bean="hibernateGroupManager" /> </constructor-arg> <constructor-arg index="2"> <ref bean="hibernatePropertySetFactory" /> </constructor-arg> <constructor-arg index="3"> <ref bean="profileProvider" /> </constructor-arg> <constructor-arg index="4"> <ref bean="accessProvider" /> </constructor-arg> </bean>
- Restart Confluence and login as an Administrator and point a browser to *http://your.server.com/admin/osuser2atluser.jsp*
- Click the link Begin migration
- You will know the migration has been successful if you see this reported:

Migrating users ... Users migrated successfully! Migrating propertyset data ... Propertyset data migrated successfully! Migrating groups ... Groups migrated successfully!
If you encounter errors, please create a support ticket at http://support.atlassian.com and attach your application server logs. - Stop Confluence and comment back in the osuMigrationBean in confluence/WEB-INF/classes/upgradeSubsystemContext.xml. That is:
<!-- To be used. optionally, to transfer ouser data to another repository. See osuser2atluser.jsp --> <!--<bean id="osuserMigrationBean" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager"> <ref bean="transactionManager"/> </property> <property name="target"> <ref local="osuserMigrationBeanTarget"/> </property> <property name="transactionAttributes"> <props> <prop key="*">PROPAGATION_REQUIRED</prop> </props> </property> <property name="proxyInterfaces"> <value>com.atlassian.user.util.migration.EntityMigrator</value> </property> </bean> <bean id="osuserMigrationBeanTarget" class="com.atlassian.user.util.migration.OSUEntityMigrator"> <constructor-arg index="0"> <ref bean="hibernateUserManager" /> </constructor-arg> <constructor-arg index="1"> <ref bean="hibernateGroupManager" /> </constructor-arg> <constructor-arg index="2"> <ref bean="hibernatePropertySetFactory" /> </constructor-arg> <constructor-arg index="3"> <ref bean="profileProvider" /> </constructor-arg> <constructor-arg index="4"> <ref bean="accessProvider" /> </constructor-arg> </bean>-->
- Start up Confluence and you should be able to login as per normal

Comments (9)
Dec 20, 2005
Damon Rand says:
There is an issue with the attached hibernate_osuser_atlassianUserContext.xml fi...There is an issue with the attached hibernate_osuser_atlassianUserContext.xml file. It has two hibernateEntityQueryParser beans defined.. You need to delete one for it too work.
Dec 20, 2005
Daniel Ostermeier says:
Hi Damon, Thank you for bringing this to our attention. This will be fixed shor...Hi Damon,
Thank you for bringing this to our attention. This will be fixed shortly.
Regards,
-Daniel
Dec 20, 2005
Damon Rand says:
I got as far as step 3.2. I am running TC 5.5.12 on JDK 5. Tomcat tells me.. o...I got as far as step 3.2. I am running TC 5.5.12 on JDK 5. Tomcat tells me..
Dec 20, 2005
Daniel Ostermeier says:
Hi Damon, There is a mistake in the imports at the top of the jsp. java.util....Hi Damon,
There is a mistake in the imports at the top of the jsp.
should be
Regards,
-Daniel
Dec 21, 2005
Damon Rand says:
Thanks, this works now!Thanks, this works now!
Dec 20, 2005
Damon Rand says:
By the way, what if I want to migrate from osuser accounts to ldap accounts inst...By the way, what if I want to migrate from osuser accounts to ldap accounts instead? My osuser usernames match my ldap account names because I have been running osuser in ldap configuration until now.
Dec 20, 2005
Daniel Ostermeier says:
Hi Damon, So long as the usernames match, this will be okay. Confluence refers ...Hi Damon,
So long as the usernames match, this will be okay. Confluence refers to users by there username, so as long the username exists in one of the repositories, all is okay.
Regards,
-Daniel
Dec 21, 2005
Damon Rand says:
Yes, it does seem to work. The issue though is that users with hibernate account...Yes, it does seem to work. The issue though is that users with hibernate accounts will not have synchronised email accounts. What I really need is a second process that migrates users from atluser_hibernate to atluser_ldap. I imagine the second process would be fairly easily, the JSP would just need to try and copy the user from "hibernateUserManager" to the "cachingLdapUserManager" and if successful delete them from hibernate.
Dec 21, 2005
Damon Rand says:
Actually I notice there is already an issue for this. CONF-4858Actually I notice there is already an issue for this. CONF-4858