You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by bu...@apache.org on 2017/10/07 16:17:28 UTC
svn commit: r1019234 - in /websites/staging/jena/trunk/content: ./
documentation/tdb2/tdb2_admin.html documentation/tdb2/tdb2_cmds.html
Author: buildbot
Date: Sat Oct 7 16:17:27 2017
New Revision: 1019234
Log:
Staging update by buildbot for jena
Modified:
websites/staging/jena/trunk/content/ (props changed)
websites/staging/jena/trunk/content/documentation/tdb2/tdb2_admin.html
websites/staging/jena/trunk/content/documentation/tdb2/tdb2_cmds.html
Propchange: websites/staging/jena/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Oct 7 16:17:27 2017
@@ -1 +1 @@
-1811411
+1811440
Modified: websites/staging/jena/trunk/content/documentation/tdb2/tdb2_admin.html
==============================================================================
--- websites/staging/jena/trunk/content/documentation/tdb2/tdb2_admin.html (original)
+++ websites/staging/jena/trunk/content/documentation/tdb2/tdb2_admin.html Sat Oct 7 16:17:27 2017
@@ -156,8 +156,50 @@
visibility: hidden;
}
h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
-<p>@@backup</p>
-<p>@@admin</p>
+<h2 id="tdb2-directory-layout">TDB2 directory layout<a class="headerlink" href="#tdb2-directory-layout" title="Permanent link">¶</a></h2>
+<p>A TDB2 database is contrained in a directory location <code>DIR</code> as:</p>
+<div class="codehilite"><pre><span class="n">DIR</span><span class="o">/</span>
+ <span class="n">Backups</span><span class="o">/</span>
+ <span class="n">Data</span><span class="o">-</span>0001<span class="o">/</span>
+ <span class="n">Data</span><span class="o">-</span>0002<span class="o">/</span>
+ <span class="n">tdb</span><span class="p">.</span><span class="n">lock</span>
+</pre></div>
+
+
+<p>where <code>Data-NNNN</code> are the compacted generations of the database. The
+highest number is the currently live database. The others are not used
+and not touched by the TDB2 storage system. They can be deleted or compressed
+as required.</p>
+<p><code>Backups</code> is teh directoryused to place backup files.</p>
+<p><code>tdb.lock</code> is the lock file to stop multipel use of the same database at
+the same time by different JVM processes.</p>
+<h2 id="compaction">Compaction<a class="headerlink" href="#compaction" title="Permanent link">¶</a></h2>
+<p>TDB2 databases grow over time as updates occur. They can be compacted by calling:</p>
+<div class="codehilite"><pre><span class="n">DatabaseMgr</span><span class="p">.</span><span class="n">compact</span><span class="p">(</span><span class="n">dataset</span><span class="p">.</span><span class="n">asDatasetGraph</span><span class="p">());</span>
+</pre></div>
+
+
+<p>This can be done on a live database. Read requests will continue to be
+serviced; write request are held up until compaction has finished. This
+can be a long time for large databases.</p>
+<p>Compaction creates a new <code>Data-NNNN</code> subdirectory and copied over the
+latest view of the RDF dataset into that directory, then switch to using
+that generation of the database. </p>
+<h2 id="backup">Backup<a class="headerlink" href="#backup" title="Permanent link">¶</a></h2>
+<p>A TDB2 database can be backed up by calling:</p>
+<div class="codehilite"><pre><span class="n">DatabaseMgr</span><span class="p">.</span><span class="n">backup</span><span class="p">(</span><span class="n">dataset</span><span class="p">.</span><span class="n">asDatasetGraph</span><span class="p">());</span>
+</pre></div>
+
+
+<p>which will create a dump file with timestamp:</p>
+<pre>
+*location*/Backups/backup-*yyyy-MM-dd_HH:mm:ss*.nq.gz
+</pre>
+
+<p>The file is a compressed N-Quads file.</p>
+<p>Backup can be done on a live database. It takes a consistent view of the
+data and does not include any updates committed after it starts.</p>
+<p>Read and write transactions will continue to be serviced.</p>
</div>
</div>
Modified: websites/staging/jena/trunk/content/documentation/tdb2/tdb2_cmds.html
==============================================================================
--- websites/staging/jena/trunk/content/documentation/tdb2/tdb2_cmds.html (original)
+++ websites/staging/jena/trunk/content/documentation/tdb2/tdb2_cmds.html Sat Oct 7 16:17:27 2017
@@ -158,6 +158,7 @@
h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
<p><em>TDB2 is not compatible with TDB1</em></p>
<p>Do not run TDB1 tools on a TDB2 database, nor run TDB2 tools on a TDB1 database.</p>
+<p>These scripts are available jena binary distribution.</p>
<ul>
<li><code>tdb2.tdbbackup</code></li>
<li><code>tdb2.tdbdump</code></li>
@@ -166,10 +167,11 @@ h2:hover > .headerlink, h3:hover > .head
<li><code>tdb2.tdbquery</code></li>
<li><code>tdb2.tdbupdate</code></li>
</ul>
+<p>On MS Windows, these commands are called <code>tdb2_tdbquery</code> etc.</p>
<p>Example usage:</p>
-<p><code>java -cp JENA_HOME/lib/* tdb2.tdbloader --loc <DB location> file1 file2 ...</code></p>
-<p>where "<code>JENA_HOME</code>" is the location of an unpacked Apache Jena binary
-distribution.</p>
+<p><code>tdb2.tdbloader --loc <DB location> file1 file2 ...</code></p>
+<p>Note:</p>
+<p><code>tdbloader2</code> is a TDB1 command tool.</p>
</div>
</div>