Package com.db4o

Interface EmbeddedObjectContainer

    • Method Detail

      • backup

        void backup​(java.lang.String path)
             throws Db4oIOException,
                    DatabaseClosedException,
                    NotSupportedException
        Backs up a database file of an open ObjectContainer.

        While the backup is running, the ObjectContainer can continue to be used. Changes that are made while the backup is in progress will be applied to the object container and to the backup.

        While the backup is running, the object container should not be closed.

        If a file already exists at the specified path, it will be overwritten.

        The Storage used for backup is the one configured for this container. If you want to use another storage implementation for the backup please use ext().backup(com.db4o.io.Storage, String).
        Parameters:
        path - a the path to the backup file
        Throws:
        DatabaseClosedException - db4o database file was closed or failed to open.
        NotSupportedException - is thrown when the operation is not supported in current configuration/environment
        Db4oIOException - I/O operation failed or was unexpectedly interrupted.