Discussion Forum

Backup/restore from knowledge graph

Dear all,

I have installed grakn.core in my ubuntu, and have inserted some rows in my entities.
How can I backup and restore from inserted rows in a file?



The best, most reliable way to reimport data into a new Grakn instance is actually simply to re-run the program that inserted the data in the first place. This assumes you have the original data and schema on hand.

If you do not have the original data and schema available, we have several workaround methods:

  • Copy the db folder: inside every grakn-core distribution, you will see a folder called server/db. Between compatible grakn versions, you can simply copy the db folder into a new grakn-core distribution. Please make sure the server is fully stopped before you try to copy or replace a db folder. Moving between incompatible grakn versions will not work if the underlying storage or data model has changed.

  • There is an unofficial, semi-functional export-import project called grakn-migrate at https://github.com/flyingsilverfin/grakn-migrate note this is not guaranteed by Grakn to work properly, and has several shortfalls listed in the README. However, in some cases it can be used to export and re-import data from Grakn to files to Grakn

  • Cassandra backups: in the db folder, we actually store all the data that is stored in our backend, Cassandra. Cassandra is widely used and has its own backup methods that can be read about online :slight_smile:

1 Like

Hi @joshua

Thanks for your reply and options for backup. I think Copy the db folder is my desire.