Interface OBackupable

All Known Subinterfaces:
ODatabase<T>, ODatabaseDocument, ODatabaseDocumentInternal, ODatabaseInternal<T>, ODatabaseObject, ODatabaseSession
All Known Implementing Classes:
ODatabaseDocumentAbstract, ODatabaseDocumentDistributed, ODatabaseDocumentDistributedPooled, ODatabaseDocumentEmbedded, ODatabaseDocumentEmbeddedPooled, ODatabaseDocumentRemote, ODatabaseDocumentRemotePooled, ODatabaseWrapperAbstract, OObjectDatabaseTx

public interface OBackupable
Interface to claim the resource can be backed up ad restored.
Author:
Luca Garulli (l.garulli--(at)--orientdb.com) (l.garulli-at-orientdb.com)
  • Method Details

    • backup

      List<String> backup(OutputStream out, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener, int compressionLevel, int bufferSize) throws IOException
      Executes a backup of the database. During the backup the database will be frozen in read-only mode.
      Parameters:
      out - OutputStream used to write the backup content. Use a FileOutputStream to make the backup persistent on disk
      options - Backup options as Map<String, Object> object
      callable - Callback to execute when the database is locked
      iListener - Listener called for backup messages
      compressionLevel - ZIP Compression level between 1 (the minimum) and 9 (maximum). The bigger is the compression, the smaller will be the final backup content, but will consume more CPU and time to execute
      bufferSize - Buffer size in bytes, the bigger is the buffer, the more efficient will be the compression
      Throws:
      IOException
      See Also:
    • restore

      void restore(InputStream in, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener) throws IOException
      Executes a restore of a database backup. During the restore the database will be frozen in read-only mode.
      Parameters:
      in - InputStream used to read the backup content. Use a FileInputStream to read a backup on a disk
      options - Backup options as Map<String, Object> object
      callable - Callback to execute when the database is locked
      iListener - Listener called for backup messages
      Throws:
      IOException
      See Also: