Reputation: 1317
I have gone through the docs and I haven't been able to fully understand them.
My question : For testing purpose we created a replica of a database in hsqldb and would want to use this as inprocess db for unit testing. Is there a way that I can distribute the replica database so that people connect to this db.I have used the backup command and have the tar file.But how do I open a connection to the db which takes this backed up db... something on the lines of handing a .mdb file in case of Access to another user and asking him/her to use that.
Regards, Chetan
Upvotes: 0
Views: 360
Reputation: 24352
You need to expand the backed up database using standard gzip / unzip tools, before you can connect to it.
The HSQLDB Jar can be used to extract the database files from the backup file. For example:
java -cp hsqldb.jar org.hsqldb.lib.tar.DbBackup --extract tardir/backup.tar dbdir
In the example, the first file path is the backup file, and the second one, dbdir, is the directory path where the database files are expanded.
Upvotes: 1