Gili...thanks.

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 ???

thanks.

On 26 nov, 19:25, cowwoc <[email protected]> wrote:
> On 26/11/2011 4:09 PM, the nigga wrote:
>
>
>
>
>
>
>
>
>
> > Hello
>
> > how to create backups h2-database in my internal application ?? I am
> > looking for but still not found...how to do this using Swing app ?
>
> > I see thishttp://www.h2database.com/h2.pdf:
>
> > Backup
> > java org.h2.tools.Script -url jdbc:h2:~/test -user sa -script test.zip
> > -options compression zi
>
> > Restore
> > java org.h2.tools.RunScript -url jdbc:h2:~/test -user sa -script
> > test.zip -options compression zip
>
> > but I dont know how to implement this in my swing app...
>
> > thanks.
>
>      My guess:
>
> String[] args =
> {
>    "-url",
>    "jdbc:h2:~/test",
>    "-user",
>    "sa",
>    "-script",
>    "test.zip"};
>
> org.h2.tools.Script.main(args);
>
> Gili

-- 
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.

Reply via email to