Upload H2 database with REST API doesn't work

Description

Tried to upload a H2 database to an existing PostGIS datastore using the REST API.

$ curl -u admin:XXXXXX -v -XPUT -H "Content-type: h2" --data-binary @myfirstjaspadb.h2 http://localhost:8080/geoserver/rest/workspaces/postgis/datastores/postgis/file.h2 - http://localhost:8080/geoserver/rest/workspaces/postgis/datastores/postgis/file.h2

The data is not loaded in postgis database and no layer is created in GeoServer. Tried also for Content-type: application/h2, as documentation is no clear about the exact value to provide, but same result.

Justin confirmed that seem there's bug in the h2 file upload:

<blockquote>The way the upload works is it relies on the zip file containing a file that matches the extension, in this case h2. But an h2 database has no file with such an extension. I tried a hack of changing the .data.db file to .h2 but it didn't work either.</blockquote>

Environment

None

Status

Assignee

Nuno Oliveira

Reporter

codehaus

Triage

None

Fix versions

Affects versions

2.3.3

Priority

Medium
Configure