Versuch OrientDB's export/import functionality zu verwenden, aber ich erhalte immer Fehler, die beide von der Kommandozeilen-Client und durch die JAVAAPI mitOrientdb: Export/Import wirft Ausnahme: „Invalid Format gefunden ungestützt Tag‚brokenRids‘.“
Erstellen einer Datenbank mit minimalem Inhalt, dann
export database /tmp/db.export -excludeAll -includeClass="asdf"
importieren dann mit
import database /tmp/db.export.gz
ergibt die Fehlermeldung Invalid format. Found unsupported tag 'brokenRids'
aufrufen. Hier ist die vollständige Konsole zu reproduzieren:
OrientDB console v.2.2.30 (build 43d850df23c0fd1edca7279761c2238fdc6cc576, branch 2.2.x) https://www.orientdb.com
Type 'help' to display all the supported commands.
orientdb> create database plocal:/var/tmp/databases/test_export_import
Creating database [plocal:/var/tmp/databases/test_export_import] using the storage type [plocal]...Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: Auto configuration of disk cache size.
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: 2095874048 B/1998 MB/1 GB of physical memory were detected on machine
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: Soft memory limit for this process is set to -1 B/-1 MB/-1 GB
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: Hard memory limit for this process is set to -1 B/-1 MB/-1 GB
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: Path to 'memory' cgroup is '/docker/f88c313794174ac8b8d7ad7d9b5fe396aea8033a1588e7eb6a3f903773081b81'
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: Mounting path for memory cgroup controller is '/sys/fs/memory'
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: Can not find '/sys/fs/memory/docker/f88c313794174ac8b8d7ad7d9b5fe396aea8033a1588e7eb6a3f903773081b81' path for memory cgroup, it is supposed that process is running in container, will try to read root '/sys/fs/memory' memory cgroup data
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: Can not read memory soft limit for cgroup '/sys/fs/memory'
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: Can not read memory hard limit for cgroup '/sys/fs/memory'
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: Detected memory limit for current process is 2095874048 B/1998 MB/1 GB
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: OrientDB auto-config DISKCACHE=444MB (heap=444MB direct=444MB os=1,998MB)
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: Lowering disk cache size from 444MB to 442MB.
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: Lowering memory chunk size from 465,567,744B to 463,470,592B.
Dec 04, 2017 8:57:36 AM com.orientechnologies.common.log.OLogManager log
INFO: $ANSI{green {db=test_export_import}} Storage 'plocal:/var/tmp/databases/test_export_import' is created under OrientDB distribution : 2.2.30 (build 43d850df23c0fd1edca7279761c2238fdc6cc576, branch 2.2.x)
Database created successfully.
Current database is: plocal:/var/tmp/databases/test_export_import
orientdb {db=test_export_import}> create class asdf
Class created successfully. Total classes in database now: 11.
orientdb {db=test_export_import}> insert into asdf content {"one": "two", "three": "four"}
Inserted record 'asdf#17:0{one:two,three:four} v1' in 0.009000 sec(s).
orientdb {db=test_export_import}> select from asdf
+----+-----+------+------+------+
|# |@RID |@CLASS|one |three |
+----+-----+------+------+------+
|0 |#17:0|asdf |two |four |
+----+-----+------+------+------+
1 item(s) found. Query executed in 0.005 sec(s).
orientdb {db=test_export_import}> export database /tmp/test_export_import.export -excludeAll -includeClass="asdf"
Exporting current database to: database /tmp/test_export_import.export -excludeAll -includeClass="asdf" in GZipped JSON format ...
Started export of database 'test_export_import' to /tmp/test_export_import.export.gz...
Exporting records...
- Cluster 'internal' (id=0)...OK (records=0/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=0/3)
- Cluster 'ouser' (id=5)...OK (records=0/3)
- Cluster 'ofunction' (id=6)...OK (records=0/0)
- Cluster 'osequence' (id=7)...OK (records=0/0)
- Cluster 'oschedule' (id=8)...OK (records=0/0)
- Cluster 'v' (id=9)...OK (records=0/0)
- Cluster 'v_1' (id=10)...OK (records=0/0)
- Cluster 'v_2' (id=11)...OK (records=0/0)
- Cluster 'v_3' (id=12)...OK (records=0/0)
- Cluster 'e' (id=13)...OK (records=0/0)
- Cluster 'e_1' (id=14)...OK (records=0/0)
- Cluster 'e_2' (id=15)...OK (records=0/0)
- Cluster 'e_3' (id=16)...OK (records=0/0)
- Cluster 'asdf' (id=17)...OK (records=1/1)
- Cluster 'asdf_1' (id=18)...OK (records=0/0)
- Cluster 'asdf_2' (id=19)...OK (records=0/0)
- Cluster 'asdf_3' (id=20)...OK (records=0/0)
Done. Exported 1 of total 10 records. 0 records were detected as broken
Database export completed in 14ms
orientdb {db=test_export_import}> delete from asdf
Delete record(s) '1' in 0.004000 sec(s).
orientdb {db=test_export_import}> import database /tmp/test_export_import.export.gz
Importing database database /tmp/test_export_import.export.gz...
Started import of database 'plocal:/var/tmp/databases/test_export_import' from /tmp/test_export_import.export.gz...
Non merge mode (-merge=false): removing all default non security classes
- Class E was removed.
- Class V was removed.
- Class OTriggered was removed.
- Class ORestricted was removed.
- Class OSchedule was removed.
- Class asdf was removed.
- Class OSequence was removed.
- Class OFunction was removed.
Removed 8 classes.
Importing records...
Started migration of links (-migrateLinks=true). Links are going to be updated according to new RIDs:
- Cluster asdf_3... Completed migration of 0 records in current cluster
- Cluster ouser... Completed migration of 3 records in current cluster
- Cluster asdf_2... Completed migration of 0 records in current cluster
- Cluster asdf_1... Completed migration of 0 records in current cluster
- Cluster default... Completed migration of 0 records in current cluster
- Cluster orole... Completed migration of 3 records in current cluster
- Cluster asdf... Completed migration of 1 records in current cluster
Total links updated: 7
Done. Imported 1 records in 0.05 secs
Error on database import happened just before line 0, column 116
com.orientechnologies.orient.core.db.tool.ODatabaseImportException: Invalid format. Found unsupported tag 'brokenRids'
at com.orientechnologies.orient.core.db.tool.ODatabaseImport.importDatabase(ODatabaseImport.java:189)
at com.orientechnologies.orient.console.OConsoleDatabaseApp.importDatabase(OConsoleDatabaseApp.java:2188)
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:498)
at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:405)
at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:260)
at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:131)
at com.orientechnologies.orient.console.OConsoleDatabaseApp.main(OConsoleDatabaseApp.java:145)
Error: com.orientechnologies.orient.core.db.tool.ODatabaseExportException: Error on importing database 'test_export_import' from file: /tmp/test_export_import.export.gz
Error: com.orientechnologies.orient.core.db.tool.ODatabaseImportException: Invalid format. Found unsupported tag 'brokenRids'
Jede Hilfe sehr geschätzt.
EDIT: die exportierten Daten sieht wie folgt aus:
gunzip -c /tmp/test_export_import.export.gz
{"records":[{"@type":"d","@rid":"#17:0","@version":1,"@class":"asdf","one":"two","three":"four"}],"brokenRids":[]}
Danke für Ihre Antwort Andrey. Ich verstehe nicht, wie das sein kann. Wie aus der obigen Konsolensitzung hervorgeht, erstelle ich die Datenbank, erstelle eine Klasse, füge einige Daten ein, exportiere, lösche Daten und importiere dann alles in derselben Konsolensitzung auf demselben Server, v2.2.30: – mxns
Könnten Sie? senden Sie mir Ihre Exportdaten? –
Exportierte Daten hinzugefügt, siehe oben Bearbeiten. Wie Sie sehen können, enthält es das anstößige Tag 'brokenRids'. – mxns