[xwiki-users] Which is the best strategy when migrating from one wiki version to another wiki version?
As of know my xwiki version is 3.2. Now we are planning to move on 3.3. Now as admin user we have done lot of customization regarding user,group,space creation and their right management. We have created some content and attachment also under some user created spaces and pages. Though everything is part of xwiki databse as i have not explicity done any settinsg to save any stuff on disk Now when i am migrating to 3.3 i am doing fresh installation. Till here fine. Now i want to migrate all 3.2 xwiki data to 3.3 xwiki. As per admin guide there seems two be two approaches :- *Approach1:-*Export 3.2 xwiki data to xar file and then import it in 3.3 xwiki. *But it did not work for me*, as after migration i do not see some stuff like main space web homepage same as it used to be in 3.2 xwiki. *Approach2:-* Take back up of complete 3.2 xwiki database . Now for 3.3 xwiki just make empty 3.3 schema and restore it to 3.2 xwiki data dump. *It worked for me.* Every thing is same in 3.3 which was there in 3.2(that is what i wanted) Now my question is it the right approach? Do i have to take some precaution or need to be careful while doing this approach? *One last question on this say there are some database configuration changes in 3.3 like deletion/addition of some table, or deltion/addition of some column etc , in that case What will be consequences of this approach?*
Approach 2 is good, when the 3.3 webapp will start, if database schema was changed it should be updated automatically - you just have to take care of setting correctly the properties for this (see here : http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HUpgradingX...) What is left is to report also any modification you would have done the the properties (xwiki.cfg, hibernate hbm, ...), and to reimport the standard 3.3 xar. For import, you should be careful not to import the standard pages you would have customized, or if you import them you will have to customize them again. Another approach would be to migrate your existing instance of 3.2 to 3.3, and just perform a database backup previously, but of course it means possible interruption of service. -- View this message in context: http://xwiki.475771.n2.nabble.com/Which-is-the-best-strategy-when-migrating-... Sent from the XWiki- Users mailing list archive at Nabble.com.
Xar is a set of wiki pages that is stored in the database. When you restore your old backup - you automatically end-up with previous version of xar. So you DO need to import the new xar file, but as Jerem validly pointed (!) see that you don't override your custom settings (simply do not import those pages OR try to re-apply the changes on new pages).
For import, you should be careful not to import the standard pages you would have customized, or if you import them you will have to customize them again. Well maybe not exactly the case here since page customization has been done. But for cases where simple settings tuning has been applied there is one flaw in upgrade process that drives me crazy. If I choose not to import some pages (those I have custom settings in) that were improved in newer release - I may not get all the benefits of new release, or even worse - I may have half-working system in case other pages that I did reimport from new release rely on the NEW behavior of not-upgraded page.
This is complex problem, it's not just enough to separate the settings values from presentation to freely upload full new XAR because settings keys also change once in a while. It might require identifying which pages were custom modified and provide means of merging those with new ones. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of jerem Sent: Friday, January 13, 2012 09:39 AM To: [email protected] Subject: Re: [xwiki-users] Which is the best strategy when migrating from one wiki version to another wiki version? Approach 2 is good, when the 3.3 webapp will start, if database schema was changed it should be updated automatically - you just have to take care of setting correctly the properties for this (see here : http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HUpgradingX...) What is left is to report also any modification you would have done the the properties (xwiki.cfg, hibernate hbm, ...), and to reimport the standard 3.3 xar. For import, you should be careful not to import the standard pages you would have customized, or if you import them you will have to customize them again. Another approach would be to migrate your existing instance of 3.2 to 3.3, and just perform a database backup previously, but of course it means possible interruption of service. -- View this message in context: http://xwiki.475771.n2.nabble.com/Which-is-the-best-strategy-when-migrating-... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On 12/01/12 17:55, mohit gupta wrote:
As of know my xwiki version is 3.2. Now we are planning to move on 3.3. Now as admin user we have done lot of customization regarding user,group,space creation and their right management. We have created some content and attachment also under some user created spaces and pages. Though everything is part of xwiki databse as i have not explicity done any settinsg to save any stuff on disk Now when i am migrating to 3.3 i am doing fresh installation. Till here fine. Now i want to migrate all 3.2 xwiki data to 3.3 xwiki. As per admin guide there seems two be two approaches :-
*Approach1:-*Export 3.2 xwiki data to xar file and then import it in 3.3 xwiki. *But it did not work for me*, as after migration i do not see some stuff like main space web homepage same as it used to be in 3.2 xwiki.
*Approach2:-* Take back up of complete 3.2 xwiki database . Now for 3.3 xwiki just make empty 3.3 schema and restore it to 3.2 xwiki data dump. *It worked for me.* Every thing is same in 3.3 which was there in 3.2(that is what i wanted) Now my question is it the right approach? Do i have to take some precaution or need to be careful while doing this approach? *One last question on this say there are some database configuration changes in 3.3 like deletion/addition of some table, or deltion/addition of some column etc , in that case What will be consequences of this approach?* _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, although as you have described there are a few ways to deal with upgrade/migration but I think the best and easiest is to: 1. Backup database 2. Backup xwiki folder from Java container then store somewhere safe so if something blows up at least there is a working instance to turn back to. I've just been through a migration and the way I did it was to use the old DB. (after backup of webapps/xwiki folder, remove it) Put the **new** Xwiki.war into the webapps/ directory of your Java container. Start the service (Glassfish, Tomcat et el....) Copy across any specific customization from the old backup: ie. hibernate.cfg.xml, xwiki.cfg, skins Logon to wiki URL as Admin Import the xwiki.x.y.xar file where the x.y should match the version of the .war Deselect anything customized! Main.WebHome Xwiki.Admin Xwiki.DefaultSkin Xwiki.XwikiPreferences Xwiki.WebPreferences Xwiki.XwikiAdminGroup Xwiki.XwikiAllGroup the above selections worked for me fine :-) Then refresh, pray and hope that everything is in order still and it should be ok. I did run into some as of yet 'unsolved' problems (nothing major to do with content or customizations) but I'm hoping that upgrading to 3.3 will solve those too. Regards, Kaya
participants (4)
-
jerem -
Kaya Saman -
mohit gupta -
Roman Muntyanu