I'm running hsqldb
in server mode and connecting to it through Java
. After I try to restore a from a backup via org.hsqldb.lib.tar.DbBackup --extract
the DB files are replaced properly, but the connection seems to only be able to access the pre-backup state of the DB. shutting down and restarting the server + connection does not work; only after terminating the Java process does it seem to update. Any ideas on what the reason might be and how to fix that? I want to display the changes realtime in my GUI without forcing the user to restart the application.
You should not attempt to restore the database from a backup while the server is running.
First SHUTDOWN the database, then restore, follow by restart.
You can run the server with remote_open, which allows you to shutdown the database without shuting down the server. After restoring the backup, you simply connect to the database again.