Skip to content

Latest commit

 

History

History
39 lines (38 loc) · 1.64 KB

loading-seed-data.md

File metadata and controls

39 lines (38 loc) · 1.64 KB

Loading seed data to neo4j database

  1. Download neo4j graph.db file and extract it.
  2. Before loading seed data, stop neo4j container.
docker stop sunbird_neo4j
  1. Replace the graph.db file in local path: $sunbird_dbs_path/neo4j/data/databases with the extracted graph.db file.
  2. Start neo4j container.
docker start sunbird_neo4j

Loading seed data to cassandra database

  1. Download cassandra backup file and extract it.
  2. stop cassandra container.
docker stop sunbird_cassandra
  1. Place the extracted cassandra_backup folder in local path: $sunbird_dbs_path/cassandra/backups.
  2. Start cassandra container.
docker start sunbird_cassandra
  1. Start cassandra shell by executing following command and type cqlsh to start cassandra cypher shell.
docker exec -it sunbird_cassandra sh
  1. Load database schema by executing below command in cypher shell.
cqlsh
source '/mnt/backups/cassandra_backup/db_schema.cql';
  1. Press ctrl + z to get out of cypher shell and stay in cassandra container shell.
  2. Now, run the following commands to load the data into earlier created tables.
sstableloader -d 127.0.0.1 /mnt/backups/cassandra_backup/data/dev_category_store/category_definition_data-fc4c9690c2bc11eb91450f9648eeaf0a
sstableloader -d 127.0.0.1 /mnt/backups/cassandra_backup/data/dev_hierarchy_store/content_hierarchy-ea2f4a20c2bc11eb91450f9648eeaf0a
sstableloader -d 127.0.0.1 /mnt/backups/cassandra_backup/data/sunbirddev_dialcode_store/system_config-1970bbe0c2c011eb91450f9648eeaf0a