You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker run -it --rm -v <local-path-to-data>:/tmp dgraph/dgraph:latest \
dgraph live --slash_grpc_endpoint <grpc-endpoint> -f /tmp/<data-file> -s /tmp/<schema-file> -t <api-key>
What did work was using docker cp to copy the export files into the container, and then run the dgraph live command in the container. This is a much easier to understand approach.
Files will be present in an export directory inside the directory you specified as the volume for the Docker container, e.g. -v ~/dgraph-v22:/dgraph
Step 2: Use docker cp to copy the exported files into your container
Using the Docker desktop application, click the button to invoke the container's CLI.
In the CLI, navigate to /dgraph (cd /dgraph)
Make a directory named export (mkdir export)
In your system CLI, i.e. not inside container, copy the export files into the container: docker cp ./g01.json.gz dgraph-22.0.2:/dgraph/export + docker cp ./g01.schema.gz dgraph-22.0.2:/dgraph/export (use the container name or ID, and copy them to the export directory you just created)
Back inside the container CLI, run cd /dgraph/exportdgraph live --alpha localhost:9080 -f ./g01.json.gz -s ./g01.schema.gz
The text was updated successfully, but these errors were encountered:
Hi @benwoodward Thank you for raising the issue. The documentation does mention about this:
Before you begin
Verify that you have a local folder <local-path-to-data> containing
at least one data file in RDF or JSON in plain or gzip format with the data to import
an optional schema file.
Those files have been generated by an [export](https://dgraph.io/docs/howto/exportdata/about-export/) or by a [data migration](https://dgraph.io/docs/migration/about-data-migration/) tool.
Can you please confirm if you faced this issue even after you followed these steps before you used live import. I am marking this issue as closed for now. Please feel free to reopen if any other issues that need to be addressed in the documentation
@benwoodward What errors did you get when you tried to follow the documentation? I am getting a no accessJWT error when I try to live import into v23.10. It's very frustrating because I am following the instructions from the docs, but as I look for a solution, I am seeing different setups for the command using Docker.
I'm running standalone Docker locally, I couldn't get the instructions from the docs to work:
https://dgraph.io/docs/howto/importdata/live-loader/
What did work was using
docker cp
to copy the export files into the container, and then run thedgraph live
command in the container. This is a much easier to understand approach.Step 1: Send export mutation to /admin endpoint
endpoint: http://localhost:8080/admin
Response will look like:
Files will be present in an
export
directory inside the directory you specified as the volume for the Docker container, e.g.-v ~/dgraph-v22:/dgraph
Step 2: Use
docker cp
to copy the exported files into your containerUsing the Docker desktop application, click the button to invoke the container's CLI.
/dgraph
(cd /dgraph
)export
(mkdir export
)docker cp ./g01.json.gz dgraph-22.0.2:/dgraph/export
+docker cp ./g01.schema.gz dgraph-22.0.2:/dgraph/export
(use the container name or ID, and copy them to the export directory you just created)cd /dgraph/export
dgraph live --alpha localhost:9080 -f ./g01.json.gz -s ./g01.schema.gz
The text was updated successfully, but these errors were encountered: