xwiki backup / database conversion
hi! im trying to install xwiki on few enviromnents and then choose one that suits best xwiki needs. im using mysql and postgresql databases and i have _great_ problem with sensible performance testing because example mysql database provided on xwiki website cannot be converted into postgresql. also dump provided for PostgreSQL doesnt work with current xwiki release... :( as there is no backup facility built into xwiki (while it should be standard) i cannot use simpliest method of data conversion. i think that backup would be very very helpful feature, not only for making backups (in xml) but also for transferring xwiki into different environments! maybe developers could look at http://dbunit.sourceforge.net/ can anyone share xwiki database dump both in MySQL and PostgreSQL format? greetings! tomek
We have some initial work on import/export.. I'll publish this with some documentation on xwiki.org possibly tonight Ludovic CeDeROM wrote:
hi!
im trying to install xwiki on few enviromnents and then choose one that suits best xwiki needs. im using mysql and postgresql databases and i have _great_ problem with sensible performance testing because example mysql database provided on xwiki website cannot be converted into postgresql. also dump provided for PostgreSQL doesnt work with current xwiki release... :(
as there is no backup facility built into xwiki (while it should be standard) i cannot use simpliest method of data conversion. i think that backup would be very very helpful feature, not only for making backups (in xml) but also for transferring xwiki into different environments! maybe developers could look at http://dbunit.sourceforge.net/
can anyone share xwiki database dump both in MySQL and PostgreSQL format?
greetings! tomek
------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic
Hi, I've posted our import/export scripts on http://www.xwiki.org/xwiki/bin/view/AdminGuide/Backup This should allow to load the default xwiki database in any xwiki compatible database. Let me know how it works. Ludovic CeDeROM wrote:
hi!
im trying to install xwiki on few enviromnents and then choose one that suits best xwiki needs. im using mysql and postgresql databases and i have _great_ problem with sensible performance testing because example mysql database provided on xwiki website cannot be converted into postgresql. also dump provided for PostgreSQL doesnt work with current xwiki release... :(
as there is no backup facility built into xwiki (while it should be standard) i cannot use simpliest method of data conversion. i think that backup would be very very helpful feature, not only for making backups (in xml) but also for transferring xwiki into different environments! maybe developers could look at http://dbunit.sourceforge.net/
can anyone share xwiki database dump both in MySQL and PostgreSQL format?
greetings! tomek
------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic
Hi! Ludovic Dubost wrote:
Hi,
I've posted our import/export scripts on http://www.xwiki.org/xwiki/bin/view/AdminGuide/Backup
This should allow to load the default xwiki database in any xwiki compatible database. Let me know how it works.
THANK YOU!!! I will check this tomorrow at work on target machine and send back a report. I could also write short howto for PostgreSQL (also on MySQL?) as I have this procedure already well known (anyway its already done in "install" section). greetings! tomek
Hi, You are welcome to come and help fill in the new Admin Guide at http://www.xwiki.org/xwiki/bin/view/AdminGuide/WebHome on these particular sections, as we are trying to have something cleaned-up. Of course reusing the existing install instructions makes sense. Ludovic CeDeROM wrote:
Hi!
Ludovic Dubost wrote:
Hi,
I've posted our import/export scripts on http://www.xwiki.org/xwiki/bin/view/AdminGuide/Backup
This should allow to load the default xwiki database in any xwiki compatible database. Let me know how it works.
THANK YOU!!! I will check this tomorrow at work on target machine and send back a report. I could also write short howto for PostgreSQL (also on MySQL?) as I have this procedure already well known (anyway its already done in "install" section).
greetings! tomek
------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic
Hi!
I've posted our import/export scripts on http://www.xwiki.org/xwiki/bin/view/AdminGuide/Backup
This should allow to load the default xwiki database in any xwiki compatible database. Let me know how it works.
i have problems: suse93:/usr/share/tomcat5/webapps/xwiki/backup # ./env.sh Caught: General error during class generation: No such class: XWikiContext in constructor call for class: xwiki.export.import. At [7:11] /srv/www/tomcat5/base/webapps/xwiki/backup/import.groovy groovy.lang.MissingClassException: No such class: XWikiContext in constructor call for class: xwiki.export.import. At [7:11] /srv/www/ tomcat5/base/webapps/xwiki/backup/import.groovy at org.codehaus.groovy.classgen.AsmClassGenerator. checkValidType(AsmClassGenerator.java:4825) at org.codehaus.groovy.classgen.AsmClassGenerator. visitConstructorCallExpression(AsmClassGenerator.java:2319) at org.codehaus.groovy.ast.expr.ConstructorCallExpression. visit(ConstructorCallExpression.java:91) at org.codehaus.groovy.classgen.AsmClassGenerator. visitAndAutoboxBoolean(AsmClassGenerator.java:4236) at org.codehaus.groovy.classgen.AsmClassGenerator. evaluateEqual(AsmClassGenerator.java:4087) at org.codehaus.groovy.classgen.AsmClassGenerator. visitBinaryExpression(AsmClassGenerator.java:1145) at org.codehaus.groovy.ast.expr.BinaryExpression. visit(BinaryExpression.java:343) at org.codehaus.groovy.classgen.AsmClassGenerator. visitAndAutoboxBoolean(AsmClassGenerator.java:4236) at org.codehaus.groovy.classgen.AsmClassGenerator. visitExpressionStatement(AsmClassGenerator.java:1131) at org.codehaus.groovy.ast.stmt.ExpressionStatement. visit(ExpressionStatement.java:70) at org.codehaus.groovy.ast.CodeVisitorSupport. visitBlockStatement(CodeVisitorSupport.java:83) at org.codehaus.groovy.ast.stmt.BlockStatement. visit(BlockStatement.java:79) at org.codehaus.groovy.classgen.AsmClassGenerator. visitMethod(AsmClassGenerator.java:393) at org.codehaus.groovy.ast.ClassNode. visitContents(ClassNode.java:803) at org.codehaus.groovy.classgen.AsmClassGenerator. visitClass(AsmClassGenerator.java:290) at org.codehaus.groovy.control.CompilationUnit$5. call(CompilationUnit.java:564) at org.codehaus.groovy.control.CompilationUnit. applyToPrimaryClassNodes(CompilationUnit.java:822) at org.codehaus.groovy.control.CompilationUnit. classgen(CompilationUnit.java:525) at org.codehaus.groovy.control.CompilationUnit. compile(CompilationUnit.java:432) at groovy.lang.GroovyClassLoader. parseClass(GroovyClassLoader.java:235) at groovy.lang.GroovyClassLoader. parseClass(GroovyClassLoader.java:204) at groovy.lang.GroovyClassLoader. parseClass(GroovyClassLoader.java:154) at groovy.lang.GroovyShell$1.run(GroovyShell.java:261) at java.security.AccessController.doPrivileged(Native Method) at groovy.lang.GroovyShell.run(GroovyShell.java:259) at groovy.lang.GroovyShell.run(GroovyShell.java:202) at groovy.ui.GroovyMain.processOnce(GroovyMain.java:397) at groovy.ui.GroovyMain.run(GroovyMain.java:233) at groovy.ui.GroovyMain.process(GroovyMain.java:219) at groovy.ui.GroovyMain.main(GroovyMain.java:123) at groovy.lang.GroovyShell.main(GroovyShell.java:121) I had problems with building xwiki from sources, so I have used build from http://build.xpertnet.biz:80/cc/buildresults/xwiki? log=log20050819033710Lbuild.88 (http://build.xpertnet.biz:80/cc/ artifacts/xwiki/20050819033710/xwiki-0.9.887.war). My env.sh: XWIKIHOME=/usr/share/tomcat5/webapps/xwiki/WEB-INF XWIKILIB=$XWIKIHOME/lib TOOLSLIB=./lib TOOLSPATH="$TOOLSLIB/commons-cli-1.0.jar" XWIKIPATH= ... CP=$TOOLSPATH:$XWIKIPATH export CP CLASSPATH=$CP #`cygpath --path --windows "$CP"` export CLASSPATH ./import.sh help :) Tomek
Hi!
I've posted our import/export scripts on http://www.xwiki.org/xwiki/bin/view/AdminGuide/Backup
This should allow to load the default xwiki database in any xwiki compatible database. Let me know how it works.
i have problems: suse93:/usr/share/tomcat5/webapps/xwiki/backup # ./env.sh Caught: General error during class generation: No such class: XWikiContext in constructor call for class: xwiki.export.import. At [7:11] /srv/www/tomcat5/base/webapps/xwiki/backup/import.groovy groovy.lang.MissingClassException: No such class: XWikiContext in constructor call for class: xwiki.export.import. At [7:11] /srv/www/ tomcat5/base/webapps/xwiki/backup/import.groovy at org.codehaus.groovy.classgen.AsmClassGenerator. checkValidType(AsmClassGenerator.java:4825) at org.codehaus.groovy.classgen.AsmClassGenerator. visitConstructorCallExpression(AsmClassGenerator.java:2319) at org.codehaus.groovy.ast.expr.ConstructorCallExpression. visit(ConstructorCallExpression.java:91) at org.codehaus.groovy.classgen.AsmClassGenerator. visitAndAutoboxBoolean(AsmClassGenerator.java:4236) at org.codehaus.groovy.classgen.AsmClassGenerator. evaluateEqual(AsmClassGenerator.java:4087) at org.codehaus.groovy.classgen.AsmClassGenerator. visitBinaryExpression(AsmClassGenerator.java:1145) at org.codehaus.groovy.ast.expr.BinaryExpression. visit(BinaryExpression.java:343) at org.codehaus.groovy.classgen.AsmClassGenerator. visitAndAutoboxBoolean(AsmClassGenerator.java:4236) at org.codehaus.groovy.classgen.AsmClassGenerator. visitExpressionStatement(AsmClassGenerator.java:1131) at org.codehaus.groovy.ast.stmt.ExpressionStatement. visit(ExpressionStatement.java:70) at org.codehaus.groovy.ast.CodeVisitorSupport. visitBlockStatement(CodeVisitorSupport.java:83) at org.codehaus.groovy.ast.stmt.BlockStatement. visit(BlockStatement.java:79) at org.codehaus.groovy.classgen.AsmClassGenerator. visitMethod(AsmClassGenerator.java:393) at org.codehaus.groovy.ast.ClassNode. visitContents(ClassNode.java:803) at org.codehaus.groovy.classgen.AsmClassGenerator. visitClass(AsmClassGenerator.java:290) at org.codehaus.groovy.control.CompilationUnit$5. call(CompilationUnit.java:564) at org.codehaus.groovy.control.CompilationUnit. applyToPrimaryClassNodes(CompilationUnit.java:822) at org.codehaus.groovy.control.CompilationUnit. classgen(CompilationUnit.java:525) at org.codehaus.groovy.control.CompilationUnit. compile(CompilationUnit.java:432) at groovy.lang.GroovyClassLoader. parseClass(GroovyClassLoader.java:235) at groovy.lang.GroovyClassLoader. parseClass(GroovyClassLoader.java:204) at groovy.lang.GroovyClassLoader. parseClass(GroovyClassLoader.java:154) at groovy.lang.GroovyShell$1.run(GroovyShell.java:261) at java.security.AccessController.doPrivileged(Native Method) at groovy.lang.GroovyShell.run(GroovyShell.java:259) at groovy.lang.GroovyShell.run(GroovyShell.java:202) at groovy.ui.GroovyMain.processOnce(GroovyMain.java:397) at groovy.ui.GroovyMain.run(GroovyMain.java:233) at groovy.ui.GroovyMain.process(GroovyMain.java:219) at groovy.ui.GroovyMain.main(GroovyMain.java:123) at groovy.lang.GroovyShell.main(GroovyShell.java:121) I had problems with building xwiki from sources, so I have used build from http://build.xpertnet.biz:80/cc/buildresults/xwiki? log=log20050819033710Lbuild.88 (http://build.xpertnet.biz:80/cc/ artifacts/xwiki/20050819033710/xwiki-0.9.887.war). My env.sh: XWIKIHOME=/usr/share/tomcat5/webapps/xwiki/WEB-INF XWIKILIB=$XWIKIHOME/lib TOOLSLIB=./lib TOOLSPATH="$TOOLSLIB/commons-cli-1.0.jar" XWIKIPATH= ... CP=$TOOLSPATH:$XWIKIPATH export CP CLASSPATH=$CP #`cygpath --path --windows "$CP"` export CLASSPATH ./import.sh help :) Tomek
The scripts have been tested on Windows with cygwin.. Other cases might need changes to the scripts probably in env.sh Ludovic CeDeROM wrote:
Hi!
I've posted our import/export scripts on
This should allow to load the default xwiki database in any xwiki
compatible database.
Let me know how it works.
i have problems:
suse93:/usr/share/tomcat5/webapps/xwiki/backup # ./env.sh
Caught: General error during class generation: No such class:
XWikiContext in constructor call for class: xwiki.export.import. At
[7:11] /srv/www/tomcat5/base/webapps/xwiki/backup/import.groovy
groovy.lang.MissingClassException: No such class: XWikiContext in
constructor call for class: xwiki.export.import. At [7:11] /srv/www/
tomcat5/base/webapps/xwiki/backup/import.groovy
at org.codehaus.groovy.classgen.AsmClassGenerator.
checkValidType(AsmClassGenerator.java:4825)
at org.codehaus.groovy.classgen.AsmClassGenerator.
visitConstructorCallExpression(AsmClassGenerator.java:2319)
at org.codehaus.groovy.ast.expr.ConstructorCallExpression.
visit(ConstructorCallExpression.java:91)
at org.codehaus.groovy.classgen.AsmClassGenerator.
visitAndAutoboxBoolean(AsmClassGenerator.java:4236)
at org.codehaus.groovy.classgen.AsmClassGenerator.
evaluateEqual(AsmClassGenerator.java:4087)
at org.codehaus.groovy.classgen.AsmClassGenerator.
visitBinaryExpression(AsmClassGenerator.java:1145)
at org.codehaus.groovy.ast.expr.BinaryExpression.
visit(BinaryExpression.java:343)
at org.codehaus.groovy.classgen.AsmClassGenerator.
visitAndAutoboxBoolean(AsmClassGenerator.java:4236)
at org.codehaus.groovy.classgen.AsmClassGenerator.
visitExpressionStatement(AsmClassGenerator.java:1131)
at org.codehaus.groovy.ast.stmt.ExpressionStatement.
visit(ExpressionStatement.java:70)
at org.codehaus.groovy.ast.CodeVisitorSupport.
visitBlockStatement(CodeVisitorSupport.java:83)
at org.codehaus.groovy.ast.stmt.BlockStatement.
visit(BlockStatement.java:79)
at org.codehaus.groovy.classgen.AsmClassGenerator.
visitMethod(AsmClassGenerator.java:393)
at org.codehaus.groovy.ast.ClassNode.
visitContents(ClassNode.java:803)
at org.codehaus.groovy.classgen.AsmClassGenerator.
visitClass(AsmClassGenerator.java:290)
at org.codehaus.groovy.control.CompilationUnit$5.
call(CompilationUnit.java:564)
at org.codehaus.groovy.control.CompilationUnit.
applyToPrimaryClassNodes(CompilationUnit.java:822)
at org.codehaus.groovy.control.CompilationUnit.
classgen(CompilationUnit.java:525)
at org.codehaus.groovy.control.CompilationUnit.
compile(CompilationUnit.java:432)
at groovy.lang.GroovyClassLoader.
parseClass(GroovyClassLoader.java:235)
at groovy.lang.GroovyClassLoader.
parseClass(GroovyClassLoader.java:204)
at groovy.lang.GroovyClassLoader.
parseClass(GroovyClassLoader.java:154)
at groovy.lang.GroovyShell$1.run(GroovyShell.java:261)
at java.security.AccessController.doPrivileged(Native
Method)
at groovy.lang.GroovyShell.run(GroovyShell.java:259)
at groovy.lang.GroovyShell.run(GroovyShell.java:202)
at groovy.ui.GroovyMain.processOnce(GroovyMain.java:397)
at groovy.ui.GroovyMain.run(GroovyMain.java:233)
at groovy.ui.GroovyMain.process(GroovyMain.java:219)
at groovy.ui.GroovyMain.main(GroovyMain.java:123)
at groovy.lang.GroovyShell.main(GroovyShell.java:121)
I had problems with building xwiki from sources, so I have used
build from http://build.xpertnet.biz:80/cc/buildresults/xwiki?
log=log20050819033710Lbuild.88 (http://build.xpertnet.biz:80/cc/
artifacts/xwiki/20050819033710/xwiki-0.9.887.war).
My env.sh:
XWIKIHOME=/usr/share/tomcat5/webapps/xwiki/WEB-INF
XWIKILIB=$XWIKIHOME/lib
TOOLSLIB=./lib
TOOLSPATH="$TOOLSLIB/commons-cli-1.0.jar"
XWIKIPATH= ...
CP=$TOOLSPATH:$XWIKIPATH
export CP
CLASSPATH=$CP #`cygpath --path --windows "$CP"`
export CLASSPATH
./import.sh
help :)
Tomek
------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic
The scripts have been tested on Windows with cygwin.. Other cases might need changes to the scripts probably in env.sh
Ok, there was some jars missing on the webapp 0.9.887, so I have borrowed them from sources. also changed env.sh a bit: XWIKIHOME=/usr/share/tomcat5/webapps/xwiki-0.9.887/WEB-INF (...) XWIKIPATH="$XWIKILIB/groovy-all-1.0-jsr-01.jar: (...) :$XWIKIHOM E/classes" Now, backup facility works fine! I'm able to move xwiki from MySQL to PostgreSQL and probably others! THANK YOU LUDOVIC! Some notes: -example database xwiki-db-0.9.1 seems to be buggy and cannot be converted by backup facility (there is error on converting attachments). -it is important to remember about jar connector files and includes, so the application can make connection to database :) I will try to prepare few scripts for MySQL and PostgreSQL separately. greetings! tomek
Yes 0.9.1 cannot be exported. There is a line that needs to be deleted in the xwikiattachment table. That's why I've attached a new version 0.9.2 on the backup page and exported a clean DB in the backup zip Ludovic CeDeROM wrote:
The scripts have been tested on Windows with cygwin.. Other cases might need changes to the scripts probably in env.sh
Ok, there was some jars missing on the webapp 0.9.887, so I have borrowed them from sources. also changed env.sh a bit:
XWIKIHOME=/usr/share/tomcat5/webapps/xwiki-0.9.887/WEB-INF (...) XWIKIPATH="$XWIKILIB/groovy-all-1.0-jsr-01.jar: (...) :$XWIKIHOM E/classes"
Now, backup facility works fine! I'm able to move xwiki from MySQL to PostgreSQL and probably others! THANK YOU LUDOVIC!
Some notes: -example database xwiki-db-0.9.1 seems to be buggy and cannot be converted by backup facility (there is error on converting attachments). -it is important to remember about jar connector files and includes, so the application can make connection to database :)
I will try to prepare few scripts for MySQL and PostgreSQL separately.
greetings! tomek
------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic
participants (2)
-
CeDeROM -
Ludovic Dubost