I'm liking H2 so I've decided to use it in production for my simple Grails web app. Which is pretty easy - I simply use this URL for my datasource: jdbc:h2:file:/home/me/db/prodDB. That works fine, but I want to be able to perform daily DB backups and I don't fully understand how to do this.
The docs on SCRIPT and BACKUP are great, but the question is how I get access to the DB from an external backup script, when it's running in the Tomcat Java process as part of my webapp. How do I get it to allow TCP connections (from localhost only) into that same DB? I assume that if I simply try to run BACKUP or SCRIPT as a tool that won't work because the DB file is held open by the existing Java process and can only be opened by one process. I don't want to have to take down my webapp to backup, so what's a nice solution here? Maybe I should just run the server separately, but I like the way the DB only runs when my app runs if its embedded. Any help much appreciated. Thanks Sam -- 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.
