Hi,
I am trying this
> String[] bkp = {"-url", "jdbc:h2:tcp://localhost:9001/db/mydb", "-
> user", "sa", "-password","123", "-script", "/MyApp/backup/myapp.zip"};
> org.h2.tools.Script.main(bkp);
>
> Generate the file.zip but when I am trying extract using WinRar or
> other return one error and not unzip the file. The error is file is
> corrupted.
>
> Any idea ???
As documented, the Script tool creates a text file that contains the SQL
statements. It doesn't create a zip file by default.
To create a zip file (that contains a text file with the SQL statements),
use:
String[] bkp = {"-url", "jdbc:h2:tcp://localhost:9001/db/mydb", "-
user", "sa", "-password","123", "-script", "/MyApp/backup/myapp.zip",
"-options", "compression", "zip"};
Regards,
Thomas
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.