| | |
| | | import static org.opends.server.messages.ToolMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.getMessage; |
| | | import static org.opends.server.util.ServerConstants.DATE_FORMAT_GMT_TIME; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.server.util.ServerConstants. |
| | | BACKUP_DIRECTORY_DESCRIPTOR_FILE; |
| | |
| | | import org.opends.server.types.Operation; |
| | | import org.opends.server.types.Privilege; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.admin.std.server.BackendCfg; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | private boolean backupBackend(Backend b, File backupLocation) |
| | | { |
| | | // Get the config entry for this backend. |
| | | ConfigEntry configEntry = configEntries.get(b.getBackendID()); |
| | | BackendCfg cfg = TaskUtils.getConfigEntry(b); |
| | | |
| | | |
| | | // If the directory doesn't exist, then create it. If it does exist, then |
| | |
| | | } |
| | | else |
| | | { |
| | | backupDir = new BackupDirectory(backupLocation.getPath(), |
| | | configEntry.getDN()); |
| | | backupDir = new BackupDirectory(backupLocation.getPath(), cfg.dn()); |
| | | } |
| | | } |
| | | else |
| | |
| | | } |
| | | |
| | | backupDir = new BackupDirectory(backupLocation.getPath(), |
| | | configEntry.getDN()); |
| | | cfg.dn()); |
| | | } |
| | | |
| | | |
| | |
| | | try |
| | | { |
| | | DirectoryServer.notifyBackupBeginning(b, backupConfig); |
| | | b.createBackup(configEntry, backupConfig); |
| | | b.createBackup(backupConfig); |
| | | DirectoryServer.notifyBackupEnded(b, backupConfig, true); |
| | | } |
| | | catch (DirectoryException de) |