> I don't think H2 has an inbuilt method to restore it... There is a Restore tool.
On Mon, Nov 28, 2011 at 8:16 AM, Thomas Mueller <[email protected]> wrote: > 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.
