Thank you, 

Is it possible to have the recovery tool recover a memFS database from a 
backup. If not, can I request this feature for the below use case.

Is there a way to get Restore to work from a backup to a memFS database? If 
> so how, if not can I request this feature? The use case being, I want to 
> open a populated memFS database on a different jvm at a later time with h2 
> in embedded mode.
>
>> Restore.execute(X, Y, null);
>
>
On Wednesday, 23 April 2014 14:59:09 UTC-4, Thomas Mueller wrote:
>
> Hi,
>
> You need to read the documentation (javadocs) about backup and restore 
> more closely. The parameter values don't make much sense to me. The 
> documentation is here:
>
>     http://h2database.com/javadoc/org/h2/tools/Backup.html
>
> You have used
>
>     Backup.execute("D:\\h2\\test.mv.db", "memFS:test", "", true);
>
> So you have set zipFileName to "D:\\h2\\test.mv.db". That doesn't make 
> sense. A typical zip file name is  "D:\\h2\\test.zip". You have set the 
> directory to the fully qualified database name (right?). I would use 
> "memFS:" instead. And as for the database name, I think you want "test".
>
> Regards,
> Thomas
>
>
> On Wed, Apr 23, 2014 at 6:10 PM, Carl Desautels 
> <[email protected]<javascript:>
> > wrote:
>
>> At this point, the backup utility can backup an memFS database, but the 
>> restore utility is failing to work going from a backup file to a memFS 
>> database.
>>
>> Given Backup being run like on a memFS database, a file is created:
>>
>>> Backup.execute("D:\\h2\\test.mv.db", "memFS:test", "", true);
>>>
>>
>> Is there a way to get Restore to work from a backup to a memFS database? 
>> If so how, if not can I request this feature? The use case being, I want to 
>> open a populated memFS database on a different jvm at a later time with h2 
>> in embedded mode.
>>
>>> Restore.execute(X, Y, null);
>>>
>>
>> On Wednesday, 23 April 2014 02:50:09 UTC-4, Thomas Mueller wrote:
>>
>>> Hi,
>>>
>>> You need to read the documentation (javadocs) about backup and restore 
>>> more closely. The parameter values don't make much sense to me.
>>>
>>> Regards,
>>> Thomas
>>>
>>>
>>>
>>> On Tue, Apr 22, 2014 at 8:20 PM, Carl Desautels <[email protected]>wrote:
>>>
>>>> Hi,
>>>>
>>>>
>>>> > Yes, this is documented. I would start with the in-memory file 
>>>> system. Instead of using regular file names, use "memFS:test". So the 
>>>> database URL would be "jdbc:h2:memFS:test". Then you can backup and 
>>>> restore 
>>>> the file using H2 tools using the file name "memFS:test.mv.db".
>>>>
>>>> I'm trying to apply this and I have a sample available here: 
>>>> https://gist.github.com/cwdesautels/11188409
>>>>
>>>> I would expect 
>>>> ln53<https://gist.github.com/cwdesautels/11188409#file-h2backuprestore-java-L53>to
>>>>  backup the memFS database and 
>>>> ln64<https://gist.github.com/cwdesautels/11188409#file-h2backuprestore-java-L64>to
>>>>  restore it, however this isn't the case, could you tell me what I'm 
>>>> doing wrong and how to get the expected results.
>>>>
>>>>
>>>> On Tuesday, 22 April 2014 14:03:45 UTC-4, Thomas Mueller wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> > BTW: If you run a recent Linux, there is a default in memory 
>>>>> filesystem named /dev/shm
>>>>>
>>>>> OK, I didn't know this. I didn't test it, but my guess is that the 
>>>>> in-memory file system "memFS:" is faster than /dev/shm, as it doesn't 
>>>>> need 
>>>>> any operating system or other native calls.
>>>>>
>>>>> Regards,
>>>>> Thomas
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Apr 22, 2014 at 8:00 AM, Christoph Läubrich <
>>>>> [email protected]> wrote:
>>>>>
>>>>>>  BTW: If you run a recent Linux, there is a default in memory 
>>>>>> filesystem named /dev/shm
>>>>>>
>>>>>> Am 21.04.2014 22:00, schrieb Carl Desautels: 
>>>>>>
>>>>>> Is there a complete sample for how to use offheap, or another file 
>>>>>> system?
>>>>>>
>>>>>> And just quickly looking over the code in OffHeapStore it is my 
>>>>>> assumption that between readFully(), offHeap's TreeMap memory, and 
>>>>>> ByteBuffer.duplicate() I could have access to the current database.
>>>>>>
>>>>>> Thanks,
>>>>>>  -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "H2 Database" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to [email protected].
>>>>>> To post to this group, send email to [email protected].
>>>>>>
>>>>>> Visit this group at http://groups.google.com/group/h2-database.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>>
>>>>>>  -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "H2 Database" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to [email protected].
>>>>>> To post to this group, send email to [email protected].
>>>>>>
>>>>>> Visit this group at http://groups.google.com/group/h2-database.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>  -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "H2 Database" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at http://groups.google.com/group/h2-database.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "H2 Database" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to