Hi,

Using the BACKUP command is a good solution. Or you can use SCRIPT
(see the docs).

The problem is that the backup doesn't copy the complete files
immediately (snapshot) but usually copies from the beginning to the
end, one file at a time. If the .log.db files are copied before the
.data.db files this could lead to problems. Also, for very big
database it could be problematic. It's something I would avoid no
matter what database you use.

I will add the following to the docs:
"Creating a backup while the database is running is not supported, except
if the file systems support creating snapshots. The problem is that it can't
be guaranteed that the data is copied in the right order (log first)."

Regards,
Thomas


On Fri, Jul 31, 2009 at 7:35 AM, M. A. Sridhar<[email protected]> wrote:
>
> Hello,
>
> I use h2 in embedded mode. I'm wondering if I can simply zip up the
> files in its directory as a backup, while the application is running.
> The intent is that I can simply unzip the files to restore from the
> backup. The problem I'm worried about is if the embedded database's
> state is cached by the currently running application, in which case
> the zip file's contents can be inconsistent and therefore unusable.
>
> Of course I can perform the zip operation after shutting down the
> application, but I want to avoid that if possible, because it is a
> running web app.
>
> Thanks in advance for your advice.
>
> Regards,
> Sridhar
>
> >
>

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