You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@marmotta.apache.org by Brent Shambaugh <br...@gmail.com> on 2016/05/27 22:13:07 UTC

Migrating Marmotta data from one instance to another

Dear all,

I am trying to migrate a marmotta backup  to another new marmotta instance.
I tried the simple import thing and it got everything in there from the
export with a selection of all, but it was not browsable from
http://localhost:8080/marmotta/ldp.  I also could not do a GET as well to
get a similar response to the instance that I backed up.

So, I turned to curl.
After reading the LDP primer I found PUT does not allow for the creation of
LDP containers, so I guessed that PATCH would allow this

I tried:

curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ttl -H
'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/

and

curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ldp -H
'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/

I am getting a 401 unauthorized even though the security profile is set to
simple.

Is there something I need to change?

Thanks for your time.

-Brent Shambaugh

Re: Migrating Marmotta data from one instance to another

Posted by Rob Atkinson <ro...@metalinkage.com.au>.
I've just had a similar conversation on the dev thread...

IMHO there is a question about whether this is a behaviour issue or a
documentation issue - so feedback requested on that..

here is Sergio's answer:

 I've managed to find my way round the LDP interface through trial and error
> to reach some answers.
>
> It seems that the LDP API is sensitive to the host name:
>  - in my environment I cannott post to localhost and get a result - I have
> to use the external IP address. This makes configuration of a re-usable
> backend a bigger pain.
>

Linked Data technologies are sensitive to the names of the resources. The
host name and port you are using for the first access to your installation
is important since decides on how Linked Data resources will be handled
later.

Even if you could reach the software by all the localhost host names
(localhost, 127.0.0.1 or its public IP), that does not mean all services
are functional. So you must use the one configured in Marmotta

Marmotta automatically configures the hostname in the first access, but you
can configure it as you need: http://marmotta.apache.org/configuration.html
…



On Sat, 28 May 2016 at 08:13 Brent Shambaugh <br...@gmail.com>
wrote:

> Dear all,
>
> I am trying to migrate a marmotta backup  to another new marmotta
> instance. I tried the simple import thing and it got everything in there
> from the export with a selection of all, but it was not browsable from
> http://localhost:8080/marmotta/ldp.  I also could not do a GET as well to
> get a similar response to the instance that I backed up.
>
> So, I turned to curl.
> After reading the LDP primer I found PUT does not allow for the creation
> of LDP containers, so I guessed that PATCH would allow this
>
> I tried:
>
> curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ttl -H
> 'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/
>
> and
>
> curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ldp -H
> 'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/
>
> I am getting a 401 unauthorized even though the security profile is set to
> simple.
>
> Is there something I need to change?
>
> Thanks for your time.
>
> -Brent Shambaugh
>
>
>

Re: Migrating Marmotta data from one instance to another

Posted by Danny Ayers <da...@gmail.com>.
export/import, no?

dump of turtle, use the upload to take it?

On 30 May 2016 at 09:41, Sergio Fernández <wi...@apache.org> wrote:

> Why not just more the whole database?
>
> On Mon, May 30, 2016 at 12:50 AM, brent.shambaugh@gmail.com <
> brent.shambaugh@gmail.com> wrote:
>
>> Thanks Rob for your thoughts! I've been looking at configuration several
>> times. Hopefully, I get my head wrapped around this. :)
>>
>> On 2016-05-29 18:43, "brent.shambaugh@gmail.com"<
>> brent.shambaugh@gmail.com> wrote:
>> > I imported the file as follows:
>> > Core Services > Import > File
>> > 1. Select imput source type: File
>> > 2. Select File: Choose File: lmf-export- ....ttl
>> > 3. Import:
>> > Source: File
>> > Relation: meta
>> > Mime: text/turtle
>> > Context: use existing
>> > 4. Select context url: http://www.w3.org/ns/ldp#
>> >
>> > This works, except the context is http://www.w3.org/ns/ldp instead of
>> http://www.w3.org/ns/ldp# . In other words, the hash was truncated.
>> >
>> > On 2016-05-29 16:28, "brent.shambaugh@gmail.com"<
>> brent.shambaugh@gmail.com> wrote:
>> > > Okay, this is funny. It did work, but I did not look like it was
>> working since it does not show up at http://localhost:8080/marmotta/ldp
>> when I type it into the browser. To get there I click on
>> http://localhost:8080/marmotta/ldp right below Triples.
>> > >
>> > > Observation:
>> > >
>> > > When I first go to (http://localhost:8080/marmotta/ldp) in the new
>> instance of Marmotta with the import I see Views and Triples below the
>> Apache Marmotta logo.
>> > >
>> > > When I got to (http://localhost:8080/marmotta/ldp) in the previous
>> instance of Marmotta from where the import came from, I see Views, Triples,
>> and Inspector.
>> > >
>> > > When I click on http://localhost:8080/marmotta/ldp in the new
>> instance the page looks like the previous instance except the content is
>> http://localhost:8080/marmotta/ldp/W .
>> > >
>> > > I will have to investigate this further
>> > >
>> > > -Brent
>> > >
>> > > On 2016-05-27 18:13, Brent Shambaugh <br...@gmail.com>
>> wrote:
>> > > > Dear all,
>> > > >
>> > > > I am trying to migrate a marmotta backup  to another new marmotta
>> instance.
>> > > > I tried the simple import thing and it got everything in there from
>> the
>> > > > export with a selection of all, but it was not browsable from
>> > > > http://localhost:8080/marmotta/ldp.  I also could not do a GET as
>> well to
>> > > > get a similar response to the instance that I backed up.
>> > > >
>> > > > So, I turned to curl.
>> > > > After reading the LDP primer I found PUT does not allow for the
>> creation of
>> > > > LDP containers, so I guessed that PATCH would allow this
>> > > >
>> > > > I tried:
>> > > >
>> > > > curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ttl -H
>> > > > 'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/
>> > > >
>> > > > and
>> > > >
>> > > > curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ldp -H
>> > > > 'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/
>> > > >
>> > > > I am getting a 401 unauthorized even though the security profile is
>> set to
>> > > > simple.
>> > > >
>> > > > Is there something I need to change?
>> > > >
>> > > > Thanks for your time.
>> > > >
>> > > > -Brent Shambaugh
>> > > >
>> > >
>> >
>>
>
>
>
> --
> Sergio Fernández
> Partner Technology Manager
> Redlink GmbH
> m: +43 6602747925
> e: sergio.fernandez@redlink.co
> w: http://redlink.co
>



-- 
----
by default format is
text/markdown+turtle
I am :
http://hyperdata.it/danja
- neither live yet, in progress

Re: Migrating Marmotta data from one instance to another

Posted by Sergio Fernández <wi...@apache.org>.
Why not just more the whole database?

On Mon, May 30, 2016 at 12:50 AM, brent.shambaugh@gmail.com <
brent.shambaugh@gmail.com> wrote:

> Thanks Rob for your thoughts! I've been looking at configuration several
> times. Hopefully, I get my head wrapped around this. :)
>
> On 2016-05-29 18:43, "brent.shambaugh@gmail.com"<br...@gmail.com>
> wrote:
> > I imported the file as follows:
> > Core Services > Import > File
> > 1. Select imput source type: File
> > 2. Select File: Choose File: lmf-export- ....ttl
> > 3. Import:
> > Source: File
> > Relation: meta
> > Mime: text/turtle
> > Context: use existing
> > 4. Select context url: http://www.w3.org/ns/ldp#
> >
> > This works, except the context is http://www.w3.org/ns/ldp instead of
> http://www.w3.org/ns/ldp# . In other words, the hash was truncated.
> >
> > On 2016-05-29 16:28, "brent.shambaugh@gmail.com"<
> brent.shambaugh@gmail.com> wrote:
> > > Okay, this is funny. It did work, but I did not look like it was
> working since it does not show up at http://localhost:8080/marmotta/ldp
> when I type it into the browser. To get there I click on
> http://localhost:8080/marmotta/ldp right below Triples.
> > >
> > > Observation:
> > >
> > > When I first go to (http://localhost:8080/marmotta/ldp) in the new
> instance of Marmotta with the import I see Views and Triples below the
> Apache Marmotta logo.
> > >
> > > When I got to (http://localhost:8080/marmotta/ldp) in the previous
> instance of Marmotta from where the import came from, I see Views, Triples,
> and Inspector.
> > >
> > > When I click on http://localhost:8080/marmotta/ldp in the new
> instance the page looks like the previous instance except the content is
> http://localhost:8080/marmotta/ldp/W .
> > >
> > > I will have to investigate this further
> > >
> > > -Brent
> > >
> > > On 2016-05-27 18:13, Brent Shambaugh <br...@gmail.com>
> wrote:
> > > > Dear all,
> > > >
> > > > I am trying to migrate a marmotta backup  to another new marmotta
> instance.
> > > > I tried the simple import thing and it got everything in there from
> the
> > > > export with a selection of all, but it was not browsable from
> > > > http://localhost:8080/marmotta/ldp.  I also could not do a GET as
> well to
> > > > get a similar response to the instance that I backed up.
> > > >
> > > > So, I turned to curl.
> > > > After reading the LDP primer I found PUT does not allow for the
> creation of
> > > > LDP containers, so I guessed that PATCH would allow this
> > > >
> > > > I tried:
> > > >
> > > > curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ttl -H
> > > > 'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/
> > > >
> > > > and
> > > >
> > > > curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ldp -H
> > > > 'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/
> > > >
> > > > I am getting a 401 unauthorized even though the security profile is
> set to
> > > > simple.
> > > >
> > > > Is there something I need to change?
> > > >
> > > > Thanks for your time.
> > > >
> > > > -Brent Shambaugh
> > > >
> > >
> >
>



-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 6602747925
e: sergio.fernandez@redlink.co
w: http://redlink.co

Re: Migrating Marmotta data from one instance to another

Posted by "brent.shambaugh@gmail.com" <br...@gmail.com>.
Thanks Rob for your thoughts! I've been looking at configuration several times. Hopefully, I get my head wrapped around this. :)

On 2016-05-29 18:43, "brent.shambaugh@gmail.com"<br...@gmail.com> wrote: 
> I imported the file as follows:
> Core Services > Import > File
> 1. Select imput source type: File
> 2. Select File: Choose File: lmf-export- ....ttl
> 3. Import:
> Source: File
> Relation: meta
> Mime: text/turtle
> Context: use existing
> 4. Select context url: http://www.w3.org/ns/ldp# 
> 
> This works, except the context is http://www.w3.org/ns/ldp instead of http://www.w3.org/ns/ldp# . In other words, the hash was truncated.
> 
> On 2016-05-29 16:28, "brent.shambaugh@gmail.com"<br...@gmail.com> wrote: 
> > Okay, this is funny. It did work, but I did not look like it was working since it does not show up at http://localhost:8080/marmotta/ldp when I type it into the browser. To get there I click on http://localhost:8080/marmotta/ldp right below Triples. 
> > 
> > Observation:
> > 
> > When I first go to (http://localhost:8080/marmotta/ldp) in the new instance of Marmotta with the import I see Views and Triples below the Apache Marmotta logo.
> > 
> > When I got to (http://localhost:8080/marmotta/ldp) in the previous instance of Marmotta from where the import came from, I see Views, Triples, and Inspector.
> > 
> > When I click on http://localhost:8080/marmotta/ldp in the new instance the page looks like the previous instance except the content is http://localhost:8080/marmotta/ldp/W .
> > 
> > I will have to investigate this further
> > 
> > -Brent
> > 
> > On 2016-05-27 18:13, Brent Shambaugh <br...@gmail.com> wrote: 
> > > Dear all,
> > > 
> > > I am trying to migrate a marmotta backup  to another new marmotta instance.
> > > I tried the simple import thing and it got everything in there from the
> > > export with a selection of all, but it was not browsable from
> > > http://localhost:8080/marmotta/ldp.  I also could not do a GET as well to
> > > get a similar response to the instance that I backed up.
> > > 
> > > So, I turned to curl.
> > > After reading the LDP primer I found PUT does not allow for the creation of
> > > LDP containers, so I guessed that PATCH would allow this
> > > 
> > > I tried:
> > > 
> > > curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ttl -H
> > > 'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/
> > > 
> > > and
> > > 
> > > curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ldp -H
> > > 'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/
> > > 
> > > I am getting a 401 unauthorized even though the security profile is set to
> > > simple.
> > > 
> > > Is there something I need to change?
> > > 
> > > Thanks for your time.
> > > 
> > > -Brent Shambaugh
> > > 
> > 
> 

Re: Migrating Marmotta data from one instance to another

Posted by "brent.shambaugh@gmail.com" <br...@gmail.com>.
I imported the file as follows:
Core Services > Import > File
1. Select imput source type: File
2. Select File: Choose File: lmf-export- ....ttl
3. Import:
Source: File
Relation: meta
Mime: text/turtle
Context: use existing
4. Select context url: http://www.w3.org/ns/ldp# 

This works, except the context is http://www.w3.org/ns/ldp instead of http://www.w3.org/ns/ldp# . In other words, the hash was truncated.

On 2016-05-29 16:28, "brent.shambaugh@gmail.com"<br...@gmail.com> wrote: 
> Okay, this is funny. It did work, but I did not look like it was working since it does not show up at http://localhost:8080/marmotta/ldp when I type it into the browser. To get there I click on http://localhost:8080/marmotta/ldp right below Triples. 
> 
> Observation:
> 
> When I first go to (http://localhost:8080/marmotta/ldp) in the new instance of Marmotta with the import I see Views and Triples below the Apache Marmotta logo.
> 
> When I got to (http://localhost:8080/marmotta/ldp) in the previous instance of Marmotta from where the import came from, I see Views, Triples, and Inspector.
> 
> When I click on http://localhost:8080/marmotta/ldp in the new instance the page looks like the previous instance except the content is http://localhost:8080/marmotta/ldp/W .
> 
> I will have to investigate this further
> 
> -Brent
> 
> On 2016-05-27 18:13, Brent Shambaugh <br...@gmail.com> wrote: 
> > Dear all,
> > 
> > I am trying to migrate a marmotta backup  to another new marmotta instance.
> > I tried the simple import thing and it got everything in there from the
> > export with a selection of all, but it was not browsable from
> > http://localhost:8080/marmotta/ldp.  I also could not do a GET as well to
> > get a similar response to the instance that I backed up.
> > 
> > So, I turned to curl.
> > After reading the LDP primer I found PUT does not allow for the creation of
> > LDP containers, so I guessed that PATCH would allow this
> > 
> > I tried:
> > 
> > curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ttl -H
> > 'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/
> > 
> > and
> > 
> > curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ldp -H
> > 'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/
> > 
> > I am getting a 401 unauthorized even though the security profile is set to
> > simple.
> > 
> > Is there something I need to change?
> > 
> > Thanks for your time.
> > 
> > -Brent Shambaugh
> > 
> 

Re: Migrating Marmotta data from one instance to another

Posted by "brent.shambaugh@gmail.com" <br...@gmail.com>.
Okay, this is funny. It did work, but I did not look like it was working since it does not show up at http://localhost:8080/marmotta/ldp when I type it into the browser. To get there I click on http://localhost:8080/marmotta/ldp right below Triples. 

Observation:

When I first go to (http://localhost:8080/marmotta/ldp) in the new instance of Marmotta with the import I see Views and Triples below the Apache Marmotta logo.

When I got to (http://localhost:8080/marmotta/ldp) in the previous instance of Marmotta from where the import came from, I see Views, Triples, and Inspector.

When I click on http://localhost:8080/marmotta/ldp in the new instance the page looks like the previous instance except the content is http://localhost:8080/marmotta/ldp/W .

I will have to investigate this further

-Brent

On 2016-05-27 18:13, Brent Shambaugh <br...@gmail.com> wrote: 
> Dear all,
> 
> I am trying to migrate a marmotta backup  to another new marmotta instance.
> I tried the simple import thing and it got everything in there from the
> export with a selection of all, but it was not browsable from
> http://localhost:8080/marmotta/ldp.  I also could not do a GET as well to
> get a similar response to the instance that I backed up.
> 
> So, I turned to curl.
> After reading the LDP primer I found PUT does not allow for the creation of
> LDP containers, so I guessed that PATCH would allow this
> 
> I tried:
> 
> curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ttl -H
> 'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/
> 
> and
> 
> curl -iX PATCH -H "Content-Type: text/turtle" --data @./ijsg.ldp -H
> 'If-Match: W/"1464384711000"' http://localhost:8080/marmotta/ldp/
> 
> I am getting a 401 unauthorized even though the security profile is set to
> simple.
> 
> Is there something I need to change?
> 
> Thanks for your time.
> 
> -Brent Shambaugh
>