Package com.orientechnologies.orient.core.db.tool

Examples of com.orientechnologies.orient.core.db.tool.ODatabaseExport


    checkForDatabase();

    message("\nExporting current database to: " + iOutputFilePath + "...");

    try {
      ODatabaseExport exporter = new ODatabaseExport(currentDatabase, iOutputFilePath, this);
      exporter.setIncludeRecords(false);
      exporter.exportDatabase().close();
    } catch (ODatabaseExportException e) {
      printError(e);
    }
  }
View Full Code Here


  @Test
  public void testDbExport() throws IOException {
    ODatabaseDocumentTx database = new ODatabaseDocumentTx(url);
    database.open("admin", "admin");

    ODatabaseExport export = new ODatabaseExport(database, testPath + "/" + EXPORT_FILE_PATH, this);
    export.exportDatabase();
    export.close();

    database.close();
  }
View Full Code Here

        @Override
        public void onMessage(String iText) {

        }
      };
      ODatabaseExport export = new ODatabaseExport(exportDatabase, EXPORT_DIR, listener);
      export.exportDatabase();
      export.close();
      exportDatabase.close();
      ODatabaseDocumentTx importDatabase = new ODatabaseDocumentTx(url + "_objectschema");
      importDatabase.open("admin", "admin");
      ODatabaseImport impor = new ODatabaseImport(importDatabase, EXPORT_DIR, listener);
View Full Code Here

    try (ODatabaseDocumentTx db = openDb()) {
      checkState(db.exists(), "Database does not exist: %s", name);

      log.debug("Starting export");
      ODatabaseExport exporter = new ODatabaseExport(db, output, new LoggingCommandOutputListener("EXPORT"));
      exporter.exportDatabase();
      log.debug("Completed export");
    }
  }
View Full Code Here

      ODocument doc = createPerson(db);

      file = File.createTempFile("export-", ".gz", util.getTmpDir());
      log("Exporting to: {}", file);

      ODatabaseExport exporter = new ODatabaseExport(db, file.getPath(), new OCommandOutputListener() {
        @Override
        public void onMessage(final String text) {
          log("> {}", text.trim());
        }
      });
      exporter.exportDatabase();
    }

    try (ODatabaseDocumentTx db = createDatabase("test2")) {
      log("Importing from: {}", file);
View Full Code Here

  public static void exportData(String appcode,OutputStream os) throws UnableToExportDbException{
    ODatabaseRecordTx db = null;
    try{
      db = open(appcode, BBConfiguration.getBaasBoxAdminUsername(), BBConfiguration.getBaasBoxAdminPassword());
     
      ODatabaseExport oe = new ODatabaseExport(db, os, new OCommandOutputListener() {
        @Override
        public void onMessage(String m) {
          Logger.info(m);
        }
      });
      synchronized(DbHelper.class)  {
        if(!dbFreeze.get()){
          dbFreeze.set(true);
        }
      }
      oe.setUseLineFeedForRecords(true);
      oe.setIncludeManualIndexes(true);
      oe.exportDatabase();
      oe.close();
    }catch(Exception ioe){
      throw new UnableToExportDbException(ioe);
    }finally{
      if(db!=null && ! db.isClosed()){
        db.close();
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.db.tool.ODatabaseExport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.