Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Graph database backup and import
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Nikhil Lanjewar  
View profile  
 More options Feb 8, 3:28 am
From: Nikhil Lanjewar <nikhil010...@gmail.com>
Date: Wed, 8 Feb 2012 00:28:05 -0800 (PST)
Local: Wed, Feb 8 2012 3:28 am
Subject: [Rexster] Graph database backup and import
Hi,

I have been playing around with Rexster lately for graph requirements
in my web product. I'm trying to use it in a ruby on Rails project by
tweaking ActiveResource to interact over REST. So far, I'm finding it
perfect for all my product requirements. :)

However, database backup is one of the major concerns while choosing
an API abstraction layer for any database. I could not find any
documentation touching topics related to database backups and
importing backed-up data with Rexster.

It would be great if someone could point me to a documentation link
for reference.

P.S.: I remember stumbling upon a forum/thread mentioning similar
functionality (export/import graph to and from a csv file) available
via rexster-console, but I can't find it anymore.

--
Nikhil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[Rexster] Graph database backup and import" by Peter Neubauer
Peter Neubauer  
View profile  
 More options Feb 8, 4:02 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Wed, 8 Feb 2012 10:02:20 +0100
Local: Wed, Feb 8 2012 4:02 am
Subject: Re: [TinkerPop] [Rexster] Graph database backup and import

Nikhil,
at least for the pure graph data, you can use GraphML import and export,
see
http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-l...
an example.

This does not save index info. For neo4j, we have been looking into a
richer format (still not superfully fledged), see http://py2neo.org/geoff/and
https://github.com/neo4j/neo4j-geoff for details.

Also, you can of course use the underlying graph to do database-specific
backup and restore, see
http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-s...
how to work with different APIs through e.g. Groovy.

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.6 released                 - dzone.com/6S4K
The Neo4j Heroku Challenge   - http://neo4j-challenge.herokuapp.com/

On Wed, Feb 8, 2012 at 9:28 AM, Nikhil Lanjewar <nikhil010...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pierre De Wilde  
View profile  
 More options Feb 8, 4:09 am
From: Pierre De Wilde <pierredewi...@gmail.com>
Date: Wed, 8 Feb 2012 10:09:25 +0100
Local: Wed, Feb 8 2012 4:09 am
Subject: Re: [TinkerPop] [Rexster] Graph database backup and import

Hey,

In TinkerPop stack, there are no specific backup/restore API.

However, you may export/import data in both GraphML and JSON format using
the following methods:

g.loadGraphML()
g.saveGraphML()

g.loadGraphSON()
g.saveGraphSON()

See doc at https://github.com/tinkerpop/gremlin/wiki/Gremlin-Methods
or code at
https://github.com/tinkerpop/gremlin/blob/master/gremlin-groovy/src/m...

HTH,
Pierre

On Wed, Feb 8, 2012 at 9:28 AM, Nikhil Lanjewar <nikhil010...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nikhil Lanjewar  
View profile  
 More options Feb 8, 8:39 am
From: Nikhil Lanjewar <nikhil010...@gmail.com>
Date: Wed, 8 Feb 2012 05:39:47 -0800 (PST)
Local: Wed, Feb 8 2012 8:39 am
Subject: Re: [TinkerPop] [Rexster] Graph database backup and import
Thanks Peter and Pierre!

g.saveGraphMl(filename) worked like a charm.

However, I'm getting an error while trying to load this GraphML using

g.loadGraphML(filename)

rexster[groovy]> g.loadGraphML('graph.xml')
==>An error occurred while processing the script for language [groovy]: javax.script.ScriptException: java.lang.RuntimeException: id is a reserved property key

Similar behavior for load/saveGraphSON . I'm using rexster-0.8-SNAPSHOT.

--
Nikhil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pierre De Wilde  
View profile  
 More options Feb 8, 9:32 am
From: Pierre De Wilde <pierredewi...@gmail.com>
Date: Wed, 8 Feb 2012 15:32:29 +0100
Local: Wed, Feb 8 2012 9:32 am
Subject: Re: [TinkerPop] [Rexster] Graph database backup and import

Hey,

It seems that you are using Rexster console. In that case, your code is
executed at the server side via RexPro. The path is therefore relative to
the Rexster server directory.

You may also use an URL instead of a filename:

g.loadGraphML(URL)

HTH,
Pierre

On Wed, Feb 8, 2012 at 2:39 PM, Nikhil Lanjewar <nikhil010...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nikhil Lanjewar  
View profile  
 More options Feb 8, 10:07 am
From: Nikhil Lanjewar <nikhil010...@gmail.com>
Date: Wed, 8 Feb 2012 07:07:17 -0800 (PST)
Local: Wed, Feb 8 2012 10:07 am
Subject: Re: [TinkerPop] [Rexster] Graph database backup and import
Hey,

I'm running both, Rexster server and console from the same directory. So, I don't think this problem should arise. Also, the error reported by rexster console doesn't talk about a FileNotFoundException or something similar.

I found an explanation for 'id is a reserved property key' at http://groups.google.com/group/gremlin-users/browse_thread/thread/778...

My saved GraphML contains an 'id' from the graph it was saved. IMO, g.saveGraphML shouldn't copy the 'id's if 'id' is a reserved property. Could you please let me know of your opinion on this?

--
Nikhil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marko Rodriguez  
View profile  
 More options Feb 8, 10:41 am
From: Marko Rodriguez <okramma...@gmail.com>
Date: Wed, 8 Feb 2012 08:41:45 -0700
Local: Wed, Feb 8 2012 10:41 am
Subject: Re: [TinkerPop] [Rexster] Graph database backup and import
Hi,

gremlin> g.saveGraphML('test.xml')
==>null
gremlin> g = new TinkerGraph()
==>tinkergraph[vertices:0 edges:0]
gremlin> g.loadGraphML('test.xml')
==>null

I don't get such a problem. Can you demonstrate how you are saving/loading your graphs?

Thanks,
Marko.

http://markorodriguez.com

On Feb 8, 2012, at 8:07 AM, Nikhil Lanjewar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Graph database backup and import" by Nikhil Lanjewar
Nikhil Lanjewar  
View profile  
 More options Feb 12, 2:37 am
From: Nikhil Lanjewar <nikhil010...@gmail.com>
Date: Sat, 11 Feb 2012 23:37:30 -0800 (PST)
Local: Sun, Feb 12 2012 2:37 am
Subject: Re: [Rexster] Graph database backup and import
Hi Marko,

Apologies for a delayed response. My Rexster configuration in
rexster.xml includes two Neo4j databases, neo4j-reloaded and neo4j-
revolutions.

neo4j-reloaded corresponds to an existing Neo4j Community 1.6M03
instance's graph.db/ with ~2900 nodes.
neo4j-revolutions corresponds to a blank location.

Both, rexster server and console, are running from the same directory.
Following is the series of command-execution from rexster-console.

rexster[groovy]> rexster.graphNames
==>neo4j-revolutions
==>emptygraph
==>neo4j-reloaded
rexster[groovy]> g_reloaded = rexster.getGraph('neo4j-reloaded')
==>neo4jgraph[EmbeddedGraphDatabase [/home/incognito/Download/neo4j-
community-1.6.M03/data.orig/graph.db]]
rexster[groovy]> g_revolutions = rexster.getGraph('neo4j-revolutions')
==>neo4jgraph[EmbeddedGraphDatabase [/home/incognito/Download/neo4j-
community-1.6.M03/blank]]
rexster[groovy]> g_reloaded.saveGraphML('neo_reloaded.xml')
==>
rexster[groovy]> g_revolutions.loadGraphML('neo_reloaded.xml')
==>An error occurred while processing the script for language
[groovy]: javax.script.ScriptException: java.lang.RuntimeException: id
is a reserved property key
rexster[groovy]>

I've tried this with Neo4j Community 1.4 instance too and got same
results. Further I have also tried executing Gremlin scripts on my
Neo4j REST server instance with similar results. Here's how:

$:~> curl --data "script=g.saveGraphML('neo.xml')"
http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script
"null"

Restarted my Neo4j with 'data' pointing to an empty directory.

$:~> curl --data "script=g.loadGraphML('neo.xml')"
http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script
"javax.script.ScriptException: java.lang.RuntimeException: id is a
reserved property key"
$:~>

My intention is to backup an existing database and import it to
another fresh database instance.

--
Nikhil

On Feb 8, 8:41 pm, Marko Rodriguez <okramma...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[Rexster] Graph database backup and import" by Peter Neubauer
Peter Neubauer  
View profile  
 More options Feb 13, 5:56 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Mon, 13 Feb 2012 11:56:26 +0100
Local: Mon, Feb 13 2012 5:56 am
Subject: Re: [TinkerPop] Re: [Rexster] Graph database backup and import
mmh,
this looks like a bug in that a graphml with an "id" property on a
node will not be able to be imported in Blueprints. I think you should
file a bug for this.

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.6 released                 - dzone.com/6S4K
The Neo4j Heroku Challenge   - http://neo4j-challenge.herokuapp.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marko Rodriguez  
View profile  
 More options Feb 13, 10:42 am
From: Marko Rodriguez <okramma...@gmail.com>
Date: Mon, 13 Feb 2012 08:42:56 -0700
Local: Mon, Feb 13 2012 10:42 am
Subject: Re: [TinkerPop] Re: [Rexster] Graph database backup and import
Hi,

I can't seem to reproduce this error. Can you provide me the smallest possible GraphML example and step-by-step test to demonstrate your problem (preferably as an issue). I can then see where the problem lays.

Thank you,
Marko.

http://markorodriguez.com

On Feb 12, 2012, at 12:37 AM, Nikhil Lanjewar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nikhil Lanjewar  
View profile  
 More options Feb 13, 10:56 am
From: Nikhil Lanjewar <nikhil010...@gmail.com>
Date: Mon, 13 Feb 2012 07:56:35 -0800 (PST)
Local: Mon, Feb 13 2012 10:56 am
Subject: Re: [TinkerPop] Re: [Rexster] Graph database backup and import
Peter and Marko,

Thanks for the response. Will add an issue shortly.

Could you please let me know what's the best location to add an issue about this? I don't think this is related exclusively to Rexster now. Seems more like a Blueprints issue. Can someone confirm?

--
Nikhil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marko Rodriguez  
View profile  
 More options Feb 13, 10:59 am
From: Marko Rodriguez <okramma...@gmail.com>
Date: Mon, 13 Feb 2012 08:59:34 -0700
Local: Mon, Feb 13 2012 10:59 am
Subject: Re: [TinkerPop] Re: [Rexster] Graph database backup and import
Hey,

If you can't reproduce the error using raw Blueprints and it only happens in Rexster, then put it in Rexster. If you can reproduce the error in raw Blueprints, then put it in Blueprints.

Raw Blueprints would look something like this:

        GraphMLReader.inputGraph(graph, new FileInputStream("my.graphml"));

HTH,
Marko.

http://markorodriguez.com

On Feb 13, 2012, at 8:56 AM, Nikhil Lanjewar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »