Would it be useful to include this information to the backup docs for users who are now using this version without the UI, Andy? I can create a PR for that if needed.
Cheers Bruno On Mon, 28 Nov 2022 at 10:38, Andy Seaborne <a...@apache.org> wrote: > > > On 27/11/2022 21:21, Tim McIver wrote: > > Thanks Andy. I probably won't have a large amount of data for some time > > but I can imagine getting a timeout or other error if there is a huge > > amount of data. Can it be returned compressed? > > That can be done with > > curl http://<fuseki-host>:3030/ds | gzip > data.trig.gz > > and there won't be a client-side whole uncompressed copy at any point. > > Andy > > > > > Tim > > > > On 11/27/22 13:53, Andy Seaborne wrote: > >> > >> > >> On 27/11/2022 18:28, Tim McIver wrote: > >>> Thanks Bruno! Yeah, that tracks since I know that LinkedDataHub > >>> <https://github.com/AtomGraph/LinkedDataHub> > >> > >> and to be clear - provided by AtomGraph, not the Apache Jena project. > >> > >> uses the "no UI" version > >>> <https://hub.docker.com/r/atomgraph/fuseki> but I hadn't realized > >>> that it did not come with the admin functions. > >>> > >>> So a follow up question would be: can I still somehow back up the data? > >> > >> The backup is an RDF file > >> > >> Another way to get an RDF file of all the data is > >> > >> curl http://<fuseki-host>:3030/ds > >> > >> will return the data as well. It's just as valid and is a isolation > >> snapshot. > >> > >> This is the simplest way. > >> > >> The backup operation, if it were available, schedules a background > >> task. That task writes to a local file which you can copy after the > >> backup has finished. > >> > >>> > >>> I have access to the data files from Fuseki and I considered just > >>> copying or rsyncing them but I know that, in general, that's not safe > >>> as I can't expect them to /not/ be updated while I'm backing them up. > >> > >> Correct - copying the database files while it is running is, in > >> general, not safe. > >> > >> If the database is compacted, the old generation data area is safe to > >> copy. > >> > >> Andy > >> > >>> > >>> Tim > >>> > >>> > >>> On 11/27/22 13:18, Bruno Kinoshita wrote: > >>>> Ah, at the top of this page: > >>>> > https://jena.apache.org/documentation/fuseki2/fuseki-main#fuseki-docker > >>>> > >>>> It says: "Fuseki main is a packaging of Fuseki as a triple store > >>>> without a > >>>> UI for administration." And further down: "The main server does not > >>>> depend > >>>> on any files on disk (other than for databases provided by the > >>>> application), and does not provide the Fuseki UI or admins functions > to > >>>> create dataset via HTTP.". I had forgotten about that change. > >>>> > >>>> So I believe you are right Tim, what you must have in your container > is > >>>> Fuseki main without the UI, so without the backup servlet & endpoint > >>>> binding (thus the 404). You can have a look at the page about Fuseki > >>>> + UI > >>>> for options for running it separately with access to admin features: > >>>> https://jena.apache.org/documentation/fuseki2/fuseki-webapp.html > >>>> > >>>> -Bruno > >>>> > >>>> On Sun, 27 Nov 2022 at 19:12, Bruno Kinoshita<brunodepau...@gmail.com > > > >>>> wrote: > >>>> > >>>>> I got the same result following the docs for the Docker compose > >>>>> installation: > >>>>> > https://jena.apache.org/documentation/fuseki2/fuseki-main#fuseki-docker > >>>>> > >>>>> Adding --update didn't solve it. So there might be something that > >>>>> needs to > >>>>> be enabled in the dataset assembler configuration when you create the > >>>>> dataset in the container. > >>>>> > >>>>> On Sun, 27 Nov 2022 at 18:56, Tim McIver<t...@timmciver.com> wrote: > >>>>> > >>>>>> It's not working for me. I even tried doing it from the fuseki > >>>>>> container. It seems this image does not have curl so I tried wget > >>>>>> using > >>>>>> 'wgethttp://localhost:3030/$/backup/ds --post-data ""'. Again, I > >>>>>> get a > >>>>>> 404. > >>>>>> > >>>>>> > >>>>>> Do the admin endpoints have to be specifically enabled? Or could > they > >>>>>> have been disabled? > >>>>>> > >>>>>> Tim > >>>>>> > >>>>>> On 11/27/22 12:07, Bruno Kinoshita wrote: > >>>>>>> Hi Tim, > >>>>>>> > >>>>>>> I am not using a container, but I just tested the latest version > >>>>>>> from > >>>>>> Git > >>>>>>> on Eclipse, and tested the endpoints with curl to query and backup. > >>>>>> Maybe > >>>>>>> your endpoint URL is missing something? > >>>>>>> > >>>>>>> 1. Create ds in-memory dataset > >>>>>>> 2. Load some dummy data > >>>>>>> 3. curl a query: $ curl 'http://localhost:3030/ds/' -X POST > >>>>>>> --data-raw > >>>>>>> 'query=...' (success, data returned as expected) > >>>>>>> 4. curl to trigger a backup: $ curl > >>>>>>> 'http://localhost:3030/$/backup/ds' > >>>>>> -X > >>>>>>> POST > >>>>>>> > >>>>>>> Then, if you want, you can also query for the tasks (a back up > >>>>>>> creates > >>>>>> an > >>>>>>> async task on the server): > >>>>>>> > >>>>>>> $ curlhttp://localhost:3030/$/tasks > >>>>>>> [ { > >>>>>>> "task" : "Backup" , > >>>>>>> "taskId" : "1" , > >>>>>>> "started" : "2022-11-27T18:06:01.868+01:00" , > >>>>>>> "finished" : "2022-11-27T18:06:01.893+01:00" , > >>>>>>> "success" : true > >>>>>>> } > >>>>>>> ] > >>>>>>> > >>>>>>> -Bruno > >>>>>>> > >>>>>>> On Sun, 27 Nov 2022 at 17:55, Tim McIver<t...@timmciver.com> > wrote: > >>>>>>> > >>>>>>>> I should mention also that the Docker image that I'm using in > >>>>>>>> this case > >>>>>>>> comes from here<https://github.com/AtomGraph/fuseki-docker>. > >>>>>>>> > >>>>>>>> On 11/27/22 11:43, Tim McIver wrote: > >>>>>>>>> Hello, > >>>>>>>>> > >>>>>>>>> I'd like to backup my Fuseki data using the web API. I found > >>>>>>>>> documentation about how to do that here > >>>>>>>>> < > >>>>>> > https://jena.apache.org/documentation/fuseki2/fuseki-server-protocol.html#backup > >>>>>>> . > >>>>>>>>> But when I try use the listed endpoints, they all result in a > 404. > >>>>>>>>> I'm using curl from a container in a Docker network to do this. I > >>>>>>>>> know that I can connect to the server because a call like "curl > >>>>>>>>> http:/<fuseki-host>:3030/ds" returns data with content type > >>>>>>>>> "application/trig". > >>>>>>>>> > >>>>>>>>> What am I missing? Any help would be appreciated. > >>>>>>>>> > >>>>>>>>> Tim > >>>>>>>>> >