It was my mistake in describing. we do use the BACKUP command and then
since it produces a zip file, we create a new zip file and copy inputStream
to another outputStream to create a new zip file (with some configs related
to the DB) and then give that zip file to the customers to use as their
Testing the backup sounds like a good idea. thanks. Still not sure what
would cause a corrupt db because if it happens while its in use, then this
is not a solution but it's a start.
--
You received this message because you are subscribed to the Google Groups H2
Database group.
To
can have other reasons. With which version of H2
was this database created? You can find it out using: select * from
information_schema.settings where name='CREATE_BUILD' - or have a look in
the SQL script created by the recover tool.
Regards,
Thomas
On Wednesday, September 3, 2014, Kam
Here's the code:
String sqlStatement = BACKUP TO ?;
try (Connection connection = getConnection())
{
try (PreparedStatement preparedStatement =
connection.prepareStatement(sqlStatement))
{
preparedStatement.setString(1, fileName);
I don't know what's causing it. We have a feature that backs up the H2 DB
file and zips it via java. the DB is in use when we back it up (all it does
is copy the h2 file) When we tried to use it, it's corrupted. This is the
stack trace when I try to open it
ZipOutputStream append = new