What i'm trying to achieve is a quick way to copy one instance of CMDBuild to another instance for testing/modeling purposes.
I've created two blank instances of CMDBuild on the same server, one called CMDBuild-Live and the other called CMDBuild-Test. Both instances work fine.
I put some classes, domains and cards into my live instance, changed the admin users default group to superuser, shut down the tomcat server, backup the live database and restore it to the test database and run the tomcat server up again. When I go to log into the test instance i'm now greeted with a message to choose a group from a dropdown box that has nothing in it.
Here is what i've tried so far with no effect.
Shutdown the tomcat server Remove the cmdbuild-test directory from \webapps Remove the cmdbuild-test directory from \work\catalina\localhost Remove the cmdbuild-test.xml file from \conf\catalina\localhost Run through the websetup using exsisting database and I still get the same issue with choose a group
If I look in the tables User, Role and map_UserRole I can see the admin user entry, superuser role entry and the mapping entry and they all appear to be correct. I'm not sure what to try now to make sure I can correctly restore the database from live to test.
yes, it's possible to dump a database "cmdbuild" and restore it in an empty database "cmdbuild-test". You will get a perfect copy, data included, of your live, original, database.
You just have to take care that the "cmdbuild-test" database is an empty database. Saying "empty" I mean that the database should be a brand new db: so, drop and recreate the old database and restore your live db.
So I created a brand new webapp called 'cmdbuild-test' and ran through the gui setup selecting to create a empty database, then I restored the live database over the new empty one and tried to login and I get the 'choose a group' at login. I don't know what's going wrong with it, the live one works just fine.
Previously Tecnoteca wrote:
Hi Dan,
yes, it's possible to dump a database "cmdbuild" and restore it in an empty database "cmdbuild-test". You will get a perfect copy, data included, of your live, original, database.
You just have to take care that the "cmdbuild-test" database is an empty database. Saying "empty" I mean that the database should be a brand new db: so, drop and recreate the old database and restore your live db.