Export graph from one server to another

I have a graph in the developer edition which I want to export schema and data mappings to another machine which has the enterprise edition installed. The target machine already has existing graphs which I do not want to lose. How can this be done?

Thank you.

The schema, data mappings, and queries can be exported with the Export Solution command on the GraphStudio home page. You can then use Import Solution to import to another machine.
Note the following however:
Export Solution does not include the database data. If you have the original data files used to populate your graph, you should use the same files again. When you look at the imported solution, on the Data Mapping page, it will show some file names, but those are just references; it does not have the actual files. You should add and upload the files again, resulting in duplicate file icons on the Data Mapping page. After you have loaded the data to the new server, you can delete the duplicate file icons.

We are working on a product update in which Export/Import will give you the option to include the data.

If you do not have the original files, you can manually write out the data by writing queries which select and output each vertex type and each edge type to a CSV file.

Thank you.

The export/import solution option wipes out any existing graphs. I was thinking of surgically coping a graph from one TG database to another and I was considering writing a tool to do this, but its more than I can handle right now. Is this function part of the vision moving forward?

Hmmm. This is a really good idea.

I’ll see if @Szilard has time to look at it (he is the Python wizard on my team). It will probably be a Python job, and of course will take some time. How urgent is this?

That’s exactly one of the things I an planning to implement using pyTigerGraph. And indeed: how urgent is it?

Not urgent. One of the many things going through my mind related to frameworks and code generation tools.

I understand how to use Export Current Solution and import it again. On top of that, I have manually configured GraphStudio to set icons/colors etc for vertices and I hope there is a way to export/import them using GSQL. I can see a gui directory in the export which include data.json and user_icons, but I don’t know how to import them back.


@John_Chen They should be saved in the export. Have you tried importing to see if the results are as you expect?

Hi @Jon_Herke, my goal is to preserve my GraphStudio GUI settings after I DROP ALL and reload the data, queries etc so as to make the process repeatable. I can use gsql to load data/query, but not the GUI setting.

I hope the gui/data.json file can be loaded directly using gsql to solve the issue – if not, it is ok, perhaps it can be a future feature.


@John_Chen It will keep your icons and colors when you export and import the solution. Just tried it on tgCloud to give you some peace of mind :slight_smile:

1 Like

Is it possible to write a GSQL script to copy the data from one databse to another?