db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Calvin Smith <cal...@thatone.com>
Subject Unable to restore a Derby database
Date Tue, 23 Nov 2004 00:47:12 GMT

I'm having trouble restoring a Derby database. I backed it up to another
directory, and then tried adding a few rows to the original database, 
disconnecting, and then connecting again with the restoreFrom attribute. 
I was able to connect successfully, but the extra records were still in 
the database, and it hadn't been overwritten.

I tried to connect first through ANT (since this is part of my build
process), but just to be sure that ANT wasn't causing the problem, I
connected with a JDBC client (DBVisualizer) and observed the same behavior.

The URL I ordinarily connect to is:


After doing the backup of the database, I verified that there were a
bunch of files in my backup directory under a directory called
'asdf' (the database name), which seems like a successful backup, but 
when I connect with the following URL:


nothing is different, and the restoreFrom apparently did nothing. Here
are my config details:

Java VM:  Java HotSpot(TM) Client VM
Java Version:  1.4.2_06-b03
Java Vendor:  Sun Microsystems Inc.
OS Name:  Linux
OS Arch:  i386
OS Version:  2.6.9

Both the Derby and Universal JDBC driver were downloaded about 5 days
ago, so they're probably the latest versions, but here's what JDBC
records as the versions:

Apache Derby
IBM DB2 JDBC Universal Driver Architecture

I also tried connecting directly using ij, and observed the same
behavior. I started ij, then executed:


And I observed that the data created after the backup occurred was still 

Any ideas what might be going on? If anybody has been able to
successfully restore, I'd really appreciate seeing a connectUrl or two 
that worked correctly.

Thanks in advance...


p.s. Erring on the side of too much info, here is the ANT target which 
shows how I'm starting the server:

<target name="db-start" description="Start derby on localhost:1527">
	<mkdir dir="${derby.basedir}"/>
	<java classname="org.apache.derby.drda.NetworkServerControl" fork="yes" 
         <arg line="start"/>
	<jvmarg value="-Dderby.system.home=${derby.basedir}"/>
	<jvmarg value="-Xmx256m"/>
         <classpath refid="db.derby.server.classpath"/>

Roughly equivalent to:

cd ${derby.basedir}; java -Dderby.system.home=${derby.basedir} -Xmx256m 
-classpath ${db.derby.server.classpath} 
org.apache.derby.drda.NetworkServerControl start

View raw message