Orientdb 简明教程
OrientDB - Import Database
您需要在导入数据库时使用由导出命令生成的导出 JSON 格式文件。
Whenever you want to import the database, you must use the JSON format exported file, which is generated by export command.
在本章中,您可以了解如何从 OrientDB 命令行导入数据库。
In this chapter you can learn how to import the database from the OrientDB command line.
以下命令为导入数据库命令的基本语法。
The following statement is the basic syntax of the Import database command.
IMPORT DATABASE <input file>
Note − 您只能在连接到特定数据库后才能使用此命令。
Note − You can use this command only after connecting to a particular database.
Example
在这个例子中,我们会使用上一章建立的,叫做“demo”的相同数据库。你可以使用以下命令,把数据库导入到名为“export-demo.gz”的文件里。
In this example, we will use the same database named ‘demo’ that we created in the previous chapter. You can use the following command to import the database to a file named ‘export-demo.gz’.
orientdb {db = demo}> IMPORT DATABASE ./export-demo.export.gz
如果成功运行,你会看到以下的输出以及成功通知。
If it is successfully executed, you will get the following output along with the successful notification.
Database import completed in 11612ms