Orientdb 简明教程
OrientDB - Restore Database
与 RDBMS 一样,OrientDB 也支持还原操作。只有在控制台模式下,你才可以成功执行此操作。
As like RDBMS, OrientDB also supports restoring operation. Only from the console mode, you can execute this operation successfully.
以下语句是还原操作的基本语法。
The following statement is the basic syntax for restoring operation.
orientdb> RESTORE DATABSE <url of the backup zip file>
Example
你必须仅在控制台模式下执行此操作。因此,你首先必须使用以下 OrientDB 命令启动 OrientDB 控制台。
You have to perform this operation only from the console mode. Therefore, first you have to start the OrientDB console using the following OrientDB command.
$ orientdb
然后,连接到相应的数据库以还原备份。你可以使用以下命令连接到名为 demo 的数据库。
Then, connect to the respective database to restore the backup. You can use the following command to connect to the database named demo.
orientdb> CONNECT PLOCAL:/opt/orientdb/databases/demo admin admin
连接成功后,你可以使用以下命令从“backup-demo.zip”文件还原备份。在执行之前,请确保将 backup-demo.zip 文件放在当前目录中。
After successful connection, you can use the following command to restore the backup from ‘backup-demo.zip’ file. Before executing, make sure the backup-demo.zip file is placed in the current directory.
Orientdb {db = demo}> RESTORE DATABASE backup-demo.zip
如果此命令成功执行,你将收到一些成功通知以及以下消息。
If this command is executed successfully, you will get some success notifications along with the following message.
Database restored in 0.26 seconds