Dear Remi,
it's usually a tough job to restore a corrupt database; at least there are no existing tools for it. The latest snapshot of BaseX [1] provides the (yet undocumented) command INSPECT, which can applied on an opened database, and which may give you some hint which part of the database has been damaged. Incremental backups are still on our agenda, and might slow down update operations, so, for the moment, I would advise to do regular backups (e.g. via CREATE BACKUP).
I hope this helps at least a little bit.. Christian
[1] files.basex.org/releases/latest/ ___________________________
On Fri, Nov 9, 2012 at 7:21 PM, Rémi Jannel remi.jannel@mydatalinx.com wrote:
Hi!
After crashing my computer while editing a BaseX database, BaseX now returns an error when trying to access the database .I was editing the database through a web application (in Javascript) communicating with BaseX through the PHP wrapper and not with BaseX GUI.
My system is Ubuntu 12.04 in a VirtualBox for the development on a Win7 64bits host system.
All the other BaseX databases are working properly but when I'm trying to open the one I need, an error is returned. I put the message at the end of the email.
I checked on my filesystem, the files corresponding to the database are still present in the BaseX data directory if you think it could be useful to debug what happened I could provide it.
Is there something wrong on the BaseX version I'm using that could explain the data being corrupted? And is there a way for me to recover the database?
The error message:
Potential bug? Improper use? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 7.0.2 Java: Sun Microsystems Inc., 1.6.0_24 OS: Linux, i386 Stack Trace: java.lang.RuntimeException: Not expected: Data Access out of bounds [pre:1078, indexSize:9, access:9 > 8]. org.basex.util.Util.notexpected(Util.java:67) org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:394) org.basex.io.random.TableDiskAccess.read1(TableDiskAccess.java:107) org.basex.data.Data.kind(Data.java:319) org.basex.query.item.DBNode$4.next(DBNode.java:317) org.basex.query.path.IterStep$1.next(IterStep.java:46) org.basex.query.path.IterStep$1.next(IterStep.java:33) org.basex.query.path.IterPath$1.next(IterPath.java:68) org.basex.query.path.IterPath$1.next(IterPath.java:40) org.basex.core.cmd.AQuery.query(AQuery.java:102) org.basex.core.cmd.XQuery.run(XQuery.java:22) org.basex.core.Command.run(Command.java:328) org.basex.core.Command.exec(Command.java:309) org.basex.core.Command.execute(Command.java:77) org.basex.server.ClientListener.run(ClientListener.java:200)
Thanks,
Remi Jannel
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk