Keep a CouchDB database and a BlazeGraph namespace in sync.
git clone https://github.com/maxlath/couchdb-blazegraph-sync
cd couchdb-blazegraph-sync
npm install --production
cp ./configs/example.js ./configs/my_db.js
Then customize ./configs/my_db
to your needs
The sync will restart from the last known seq, which is persisted in a file per database: ./data/my_db.last_seq
This tool isn't designed to load a full database, rather to keep up with the changes, so first make sure you to import a dump directly
# Use your serializer to generate a dump of your CouchDB database, this is out of the scope of this tool
curl http://my-blazegraph:8080/bigdata/namespace/kb/dataloader -H 'Content-Type: application/x-turtle' -d@./my_db.ttl
# Set the current last seq
curl "http://username:password@localhost:5984/my_db" | jq '.update_seq' > ./data/my_db.last_seq
# Or set an arbitrary point to start from
printf '1079700' > ./data/my_db.last_seq
npm start
# From the project root, assumes that you need sudo rights
npm run add-to-systemd
# Start the process
sudo systemctl start couchdb-blazegraph-sync
# Start following the logs
journalctl -fan 100 -u couchdb-blazegraph-sync