OrientDB导出数据库

算法 ww9992019com 发表于 1 周前

<div style="width:100%;float:left;" class="article-content">

                <input type="hidden" name="article_id" id="article_id" value="13316">
                <input type="hidden" name="catid" id="catid" value="0">

                <p>与RDBMS类似,OrientDB还提供了导出和导入数据库等功能。 OrientDB使用JSON格式导出数据。 默认情况下,<code>export</code>命令使用GZIP算法来压缩文件。</p>

<p>导出数据库时不会锁定数据库,这意味着您可以对其执行并发读取和写入操作。可以创建该数据的完全副本,因为并发的读取和写入操作。</p>

<p>在本章中,学习如何从OrientDB命令行导出数据库。</p>

<p>以下语句是<code>Export database</code>命令的基本语法。</p>

<pre><code class="lang-shell">EXPORT DATABASE &lt;output file&gt;

</code></pre>

<blockquote>

<p>注 - 只有在连接到特定数据库后才能使用此命令。</p>

</blockquote>

<p><strong>示例</strong></p>

<p>在这个例子中,我们将使用在前一章中创建的名为<code>demo</code>的数据库。可以使用以下命令将数据库导出到名为<code>export-demo</code>的文件。</p>

<pre><code class="lang-shell">orientdb {db = demo}&gt; EXPORT DATABASE ./export-demo.export

</code></pre>

<p>如果它成功执行,它将根据操作系统创建一个名为<code>'export-demo.zip'</code>或<code>'exportdemo.gz'</code>的文件,将会看到以下输出。</p>

<pre><code class="lang-shell">Exporting current database to: DATABASE /home/linuxtp/Desktop/demo.export in

GZipped JSON format ...

Started export of database 'demo' to /home/linuxtp/Desktop/demo.export.gz...

Exporting database info...OK

Exporting clusters...OK (12 clusters)

Exporting schema...OK (11 classes)

Exporting records...

  • Cluster 'internal' (id = 0)...OK (records = 3/3)

  • Cluster 'index' (id = 1)...OK (records = 0/0)

  • Cluster 'manindex' (id = 2)...OK (records = 0/0)

  • Cluster 'default' (id = 3)...OK (records = 0/0)

  • Cluster 'orole' (id = 4)...OK (records = 3/3)

  • Cluster 'ouser' (id = 5)...OK (records = 3/3)

  • Cluster 'ofunction' (id = 6)...OK (records = 0/0)

  • Cluster 'oschedule' (id = 7)...OK (records = 0/0)

  • Cluster 'orids' (id = 8)...OK (records = 0/0)

  • Cluster 'v' (id = 9)...OK (records = 0/0)

  • Cluster 'e' (id = 10)...OK (records = 0/0)

  • Cluster '_studio' (id = 11)...OK (records = 1/1)

Done. Exported 10 of total 10 records

Exporting index info...

  • Index dictionary...OK

  • Index OUser.name...OK

  • Index ORole.name...OK

OK (3 indexes)

Exporting manual indexes content...

  • Exporting index dictionary ...OK (entries = 0)

OK (1 manual indexes)

Database export completed in 127ms

</code></pre>

                <br>
                <p style="text-align:center;float:left;width:100%;margin-top:24px;margin-bottom:18px;">
                        <button class="layui-btn layui-btn-danger" id="btn-reward"> ¥ 我要打赏 </button>  
                        <button class="layui-btn" id="article-perfect">
                            <i class="layui-icon layui-icon-edit"></i>教程纠错
                        </button>
                        <button class="layui-btn layui-btn-normal" id="action-collection">
                            <i class="layui-icon layui-icon-rate"></i>收藏
                        </button>
                </p>



                <div style="width:100%;margin-bottom: 16px; height: 32px;margin-top:18px;float:left;">

                    <span style="float:left;">上一篇:<a href="http://f2e.im/u/ww9992019com" title="OrientDB配置数据库"><i class="layui-icon"></i>
                            OrientDB配置数据库</a></span>
                                            <span style="float:right;">下一篇:<a href="http://f2e.im/u/ww9992019com" style="float:right;" title="下一篇:OrientDB导入数据库"><i class="layui-icon"></i>
                            OrientDB导入数据库</a></span>
                                            <div id="googlead" style="float:left;margin-top:8px;">
                        <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                        <!-- yiibai下方 -->
                        <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-1090193214637198" data-ad-slot="6494738921"></ins>
                        <script>
                            (adsbygoogle = window.adsbygoogle || []).push({});
                        </script>
                    </div>
                </div>

                <div style="width:100%;margin-top:18px;float:left;">


            </div>
暂无回复,说出你的观点吧
登录后即可参与回复