Motivation
A user running their instance of Wikibase may want to dump RDFs from that instance to export it to another system, back it up .. etc
Problem
Running the RDF export command described in the repo
docker-compose exec wikibase php ./extensions/Wikibase/repo/maintenance/dumpRdf.php
conceptUris use hash-based in the ttl that is based on the docker container hash ID. see e.g. output in original description.
Suggested Solution
- Allow configuring the domain for conceptURIs:
https://phabricator.wikimedia.org/T227643#5320426
The solution is to add #wgServer with the proper value in LocalSettings.php
To do that you need to add an entry such as ${DOLLAR}wgServer = "${SERVER}"; in the LocalSettings.php.template file as described here
and add SERVER as an environment variable in the compose file
- Check that changes do not break WDQS updater internally
Original Description
Running the RDF export command described in the repo
docker-compose exec wikibase php ./extensions/Wikibase/repo/maintenance/dumpRdf.php
I get a hash-based conceptUri in the ttl that is based on the docker container hash ID. e.g.
Dumping entities of type item, property Dumping shard 0/1 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix wikibase: <http://wikiba.se/ontology-beta#> . @prefix wds: <http://80a2076ec8c0/entity/statement/> . @prefix wdata: <http://80a2076ec8c0/wiki/Special:EntityData/> . @prefix skos: <http://www.w3.org/2004/02/skos/core#> . @prefix schema: <http://schema.org/> . @prefix cc: <http://creativecommons.org/ns#> . @prefix geo: <http://www.opengis.net/ont/geosparql#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix wdref: <http://80a2076ec8c0/reference/> . @prefix wdv: <http://80a2076ec8c0/value/> . @prefix wd: <http://80a2076ec8c0/entity/> . @prefix wdt: <http://80a2076ec8c0/prop/direct/> . @prefix wdtn: <http://80a2076ec8c0/prop/direct-normalized/> . @prefix p: <http://80a2076ec8c0/prop/> . @prefix ps: <http://80a2076ec8c0/prop/statement/> . @prefix psv: <http://80a2076ec8c0/prop/statement/value/> . @prefix psn: <http://80a2076ec8c0/prop/statement/value-normalized/> . @prefix pq: <http://80a2076ec8c0/prop/qualifier/> . @prefix pqv: <http://80a2076ec8c0/prop/qualifier/value/> . @prefix pqn: <http://80a2076ec8c0/prop/qualifier/value-normalized/> . @prefix pr: <http://80a2076ec8c0/prop/reference/> . @prefix prv: <http://80a2076ec8c0/prop/reference/value/> . @prefix prn: <http://80a2076ec8c0/prop/reference/value-normalized/> . @prefix wdno: <http://80a2076ec8c0/prop/novalue/> . ...
I tried to find some parameter to indicate my subdomain in the dump script but couldn't. any help on how to set this up would be greatly appreciated