0

由于内存不足,我们的网格实例崩溃并使数据库处于不一致的状态。网格不再启动,我没有机会使用还原端点。有没有其他方法可以恢复数据库?

这是错误输出:

SEVERE: $ANSI{green {db=storage}} Exception during index 'e.has_branch_inout' deletion
com.orientechnologies.orient.core.exception.OPageIsBrokenException: Following files and pages are detected to be broken ['e.has_field_container_branch_type_lang.hib' :86;], storage is switched to 'read only' mode. Any modification operations are prohibited. To restore database and make it fully operational you may export and import database to and from JSON.
DB name="storage"
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.checkLowDiskSpaceRequestsAndReadOnlyConditions(OAbstractPaginatedStorage.java:5143)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.deleteIndexEngine(OAbstractPaginatedStorage.java:2113)
        at com.orientechnologies.orient.core.index.OIndexAbstract.create(OIndexAbstract.java:259)
        at com.orientechnologies.orient.core.index.OIndexMultiValues.create(OIndexMultiValues.java:258)
        at com.orientechnologies.orient.core.index.OIndexMultiValues.create(OIndexMultiValues.java:44)
        at com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask.createAutomaticIndex(OIndexManagerShared.java:600)
        at com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask.recreateIndex(OIndexManagerShared.java:586)
        at com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask.recreateIndexes(OIndexManagerShared.java:534)
        at com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask.run(OIndexManagerShared.java:515)
        at java.lang.Thread.run(Thread.java:745)

谢谢你的帮助!

4

2 回答 2

1

我们设法使用 OrientDB shell 恢复了数据库。

  • 首先我们删除了所有的 *.hib 文件
  • 通过 docker 启动 OrientDB shell
  • 然后我们导出旧数据
  • 创建了一个新的数据库
  • 最后我们将旧数据导入新数据库并启动网格
于 2018-09-04T07:55:02.077 回答
0

您可以尝试删除存储目录中的所有 *.hib 文件并重新启动 Mesh。(预先创建备份)

否则,不幸的是,您需要下载 OrientDB 2.2.x,在 OrientDB 安装中添加网格数据库并调用导入/导出:

https://orientdb.com/docs/2.2.x/Export-Format.html

如果 Gentics Mesh 的 REST API 可以访问,您还可以尝试调用备份和恢复端点。这可以通过mesh-cli完成:

mesh admin backup
mesh admin restore
于 2018-08-31T10:44:48.330 回答