From 75fceea66e311b3de58d76a4c993af0fec13dd3d Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Mon, 27 Apr 2015 13:20:04 +0000
Subject: [PATCH] OPENDJ-1870 CR-6581 Update BackupManager to generic tool
---
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Storage.java | 60 ++++++++++++++++++++++++++++++++++++++----------------------
1 files changed, 38 insertions(+), 22 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Storage.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Storage.java
index ec43495..3bf0247 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Storage.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Storage.java
@@ -26,8 +26,11 @@
package org.opends.server.backends.pluggable.spi;
import java.io.Closeable;
-import java.io.File;
-import java.io.FilenameFilter;
+
+import org.opends.server.types.BackupConfig;
+import org.opends.server.types.BackupDirectory;
+import org.opends.server.types.DirectoryException;
+import org.opends.server.types.RestoreConfig;
/**
* This interface abstracts the underlying storage engine,
@@ -100,27 +103,40 @@
*/
boolean supportsBackupAndRestore();
- /**
- * Returns the file system directory in which any database files are located. This method is
- * called when performing backup and restore operations.
- *
- * @return The file system directory in which any database files are located.
- * @throws UnsupportedOperationException
- * If backup and restore is not supported by this storage.
- */
- File getDirectory();
-
- /**
- * Returns a filename filter which selects the files to be included in a backup. This method is
- * called when performing backup operations.
- *
- * @return A filename filter which selects the files to be included in a backup.
- * @throws UnsupportedOperationException
- * If backup and restore is not supported by this storage.
- */
- FilenameFilter getFilesToBackupFilter();
-
/** {@inheritDoc} */
@Override
void close();
+
+ /**
+ * Creates a backup for this storage.
+ *
+ * @param backupConfig
+ * The configuration to use when performing the backup.
+ * @throws DirectoryException
+ * If a Directory Server error occurs.
+ */
+ void createBackup(BackupConfig backupConfig) throws DirectoryException;
+
+ /**
+ * Removes a backup for this storage.
+ *
+ * @param backupDirectory
+ * The backup directory structure with which the specified backup is
+ * associated.
+ * @param backupID
+ * The backup ID for the backup to be removed.
+ * @throws DirectoryException
+ * If it is not possible to remove the specified backup.
+ */
+ void removeBackup(BackupDirectory backupDirectory, String backupID) throws DirectoryException;
+
+ /**
+ * Restores a backup for this storage.
+ *
+ * @param restoreConfig
+ * The configuration to use when performing the restore.
+ * @throws DirectoryException
+ * If a Directory Server error occurs.
+ */
+ void restoreBackup(RestoreConfig restoreConfig) throws DirectoryException;
}
--
Gitblit v1.10.0