OrientDB数据库导入失败

时间:2015-12-23 11:12:08

标签: database orientdb database-restore orientdb-2.1

我使用以下命令创建了一个OrientDB备份:

./backup.sh plocal:../databases/DemoDB demo demo demo.zip

现在,为了测试我的备份是否成功,我已经删除并重新创建了我的数据库,现在我正在使用控制台导入它:

IMPORT DATABASE "/Users/erik/databases/demo.zip"

我现在受到以下错误的欢迎:

Started import of database 'plocal:../databases/BestProgrammingBooks' from /Users/erik/databases/demo.zip...
Non merge mode (-merge=false): removing all default non security classes
Removed 0 classes.Error on database import happened just before line 299, column 444
java.lang.NumberFormatException: For input string: "22Vp"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:580)
    at com.orientechnologies.orient.core.serialization.serializer.OJSONReader.nextChar(OJSONReader.java:273)
    at com.orientechnologies.orient.core.serialization.serializer.OJSONReader.readNext(OJSONReader.java:174)
    at com.orientechnologies.orient.core.serialization.serializer.OJSONReader.readString(OJSONReader.java:92)
    at com.orientechnologies.orient.core.serialization.serializer.OJSONReader.readString(OJSONReader.java:87)
    at com.orientechnologies.orient.core.serialization.serializer.OJSONReader.readString(OJSONReader.java:83)
    at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importDatabase(ODatabaseImport.java:423)
    at com.orientechnologies.orient.console.OConsoleDatabaseApp.importDatabase(OConsoleDatabaseApp.java:1711)
    at com.orientechnologies.orient.graph.console.OGremlinConsole.importDatabase(OGremlinConsole.java:126)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:392)
    at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:253)
    at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:142)
    at com.orientechnologies.orient.graph.console.OGremlinConsole.main(OGremlinConsole.java:64)

Error: com.orientechnologies.orient.core.db.tool.ODatabaseExportException: Error on importing database 'BestProgrammingBooks' from file: /Users/erik/databases/demo.zip
Error: java.lang.NumberFormatException: For input string: "22Vp

她发生了什么事,我该如何解决这个问题?我在Mac上使用OrientDB 2.1.5。

1 个答案:

答案 0 :(得分:1)

给定备份,要恢复数据库,正确的操作是RESTORE,而不是IMPORT。 IMPORT是指您希望导入先前使用EXPORT命令导出的数据库。

有关详细信息,请查看:http://orientdb.com/docs/2.0/orientdb.wiki/Backup-and-Restore.html