Andy I don't see any exception when I run tdbloader but I data still isn't
being imported. Should I try to get another backup using version 2015-03-07
build? I just used the same backup version I already had. Just to make sure
I am doing it correctly. This is my process.
1. Click backup from fuseki ui
2. remove all files in (rm -rf $FUSEKI_HOME/databases/myapp/*)
3. downloaded apache-jena-2.12.1
4. ran bin/tdbloader --loc=$FUSEKI_HOME/databases/myapp
backups/backup_file.nq.gz
5. restart fuseki
6. SELECT (COUNT(*) as ?no) ?g
WHERE {
GRAPH ?g {?s ?p ?o}
}
I get no results. I get no exception. This is the output from tdbloader.
19:24:45 INFO loader :: -- Start triples data phase
19:24:45 INFO loader :: ** Load empty triples table
19:24:45 INFO loader :: -- Start quads data phase
19:24:45 INFO loader :: ** Load empty quads table
19:24:45 INFO loader :: Load:
$BACKUP_DIR/backups/myapp_2015-03-06_17-03-52.nq.gz -- 2015/03/07 19:24:45
EST
19:24:45 INFO loader :: -- Finish triples data phase
19:24:45 INFO loader :: -- Finish quads data phase
19:24:45 INFO loader :: -- Finish triples load
19:24:45 INFO loader :: -- Finish quads load
On Sat, Mar 7, 2015 at 1:03 PM, Trevor Donaldson <[email protected]>
wrote:
> Ok haven't had a chance to check the exception. Thanks
> On Mar 7, 2015 12:34 PM, "Andy Seaborne" <[email protected]> wrote:
>
>> On 07/03/15 10:46, Andy Seaborne wrote:
>>
>>> On 06/03/15 22:31, Trevor Donaldson wrote:
>>>
>>>> so not seeing data. I may have done something incorrect.
>>>>
>>>
>>> No, you're not ... :-(
>>>
>>> Is there an exception in log file?
>>>
>>> ------------------
>>> [2015-03-07 10:20:49] Backup INFO [11] **** Exception in backup
>>> com.hp.hpl.jena.tdb.transaction.TDBTransactionException: Not in a
>>> transaction
>>> ------------------
>>>
>>>
>>> Recorded as JENA-895
>>>
>>> (either there has been a regression in the code or all the development
>>> work happen to find a timing hole whereby it can work if the backup
>>> happens very early in a server's life)
>>>
>>> Andy
>>>
>>
>> Assuming you were getting the same exception as I found, this should be
>> fixed. I've done a "deploy" as well so built development binaries are up to
>> date.
>>
>> Andy
>>
>>
>>
>>>
>>>> 1. Backed up dataset
>>>> 2. Deleted all files in ($FUSEKI_HOME/run/databases/myapp)
>>>> 3. tdbloader --loc=$FUSEKI_HOME/run/databases/myapp backup.nq.gz
>>>> 4. restarted fuseki.
>>>> 5. went to count triples on fuseki web page. Counts are all 0.
>>>>
>>>>
>>>> On Fri, Mar 6, 2015 at 3:28 PM, Andy Seaborne <[email protected]> wrote:
>>>>
>>>> On 06/03/15 18:10, Trevor Donaldson wrote:
>>>>>
>>>>> Thanks Andy the link is very helpful. I am assuming that in order to
>>>>>> reimport I would use tdbloader. Is this right?
>>>>>>
>>>>>>
>>>>> yes - backups are compressed n-quads, .nq.gz
>>>>>
>>>>> Andy
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Mar 6, 2015 at 12:47 PM, Andy Seaborne <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>> On 06/03/15 16:29, Trevor Donaldson wrote:
>>>>>>
>>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>>>
>>>>>>>> I was wondering if there is a way to programmatically backup
>>>>>>>> the tdb
>>>>>>>> instance? I found this question
>>>>>>>> http://webcache.googleusercontent.com/search?
>>>>>>>> q=cache:0whNmMD65OcJ:answers.semanticweb.com/questions/
>>>>>>>> 24740/how-do-you-create-and-restore-backups-with-fuseki-
>>>>>>>> and-tdb+&cd=3&hl=en&ct=clnk&gl=us
>>>>>>>> but it is referencing fuseki 1 (i.e. --mgtPort=port). Is there
>>>>>>>> another
>>>>>>>> way
>>>>>>>> that a backup and a restore should be handled in fuseki2?
>>>>>>>>
>>>>>>>> Thanks in advance,
>>>>>>>>
>>>>>>>> Trevor
>>>>>>>>
>>>>>>>>
>>>>>>>> See staging documentation:
>>>>>>>>
>>>>>>>
>>>>>>> http://jena.staging.apache.org/documentation/fuseki2/fuseki-server-
>>>>>>> protocol.html
>>>>>>>
>>>>>>> POST /$/backup/{name}
>>>>>>>
>>>>>>> The admin interface has to be on the same port (WAR file
>>>>>>> deployment) and
>>>>>>> it's under /$/, protected by Shiro (this is what the UI does when you
>>>>>>> press
>>>>>>> the backup button)
>>>>>>>
>>>>>>> There was a very recent bug fix (a few days ago) - the backup was
>>>>>>> written
>>>>>>> to the wrong place. The latest build, it's written to
>>>>>>> $FUSEKI_BASE/backups/
>>>>>>>
>>>>>>> Andy
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>