Class RestoreDB

  • All Implemented Interfaces:
    TaskScheduleInformation

    public class RestoreDB
    extends TaskTool
    This program provides a utility that may be used to restore a binary backup of a Directory Server backend generated using the BackUpDB tool. This will be a process that is intended to run separate from Directory Server and not internally within the server process (e.g., via the tasks interface).
    • Constructor Detail

      • RestoreDB

        public RestoreDB()
    • Method Detail

      • main

        public static void main​(String[] args)
        The main method for RestoreDB tool.
        Parameters:
        args - The command-line arguments provided to this program.
      • mainRestoreDB

        public static int mainRestoreDB​(String[] args)
        Processes the command-line arguments and invokes the restore process.
        Parameters:
        args - The command-line arguments provided to this program.
        Returns:
        The error code.
      • mainRestoreDB

        public static int mainRestoreDB​(String[] args,
                                        boolean initializeServer,
                                        OutputStream outStream,
                                        OutputStream errStream)
        Processes the command-line arguments and invokes the restore process.
        Parameters:
        args - The command-line arguments provided to this program.
        initializeServer - Indicates whether to initialize the server.
        outStream - The output stream to use for standard output, or null if standard output is not needed.
        errStream - The output stream to use for standard error, or null if standard error is not needed.
        Returns:
        The error code.
      • addTaskAttributes

        public void addTaskAttributes​(List<RawAttribute> attributes)
        Adds utility specific attributes to attributes for population of the entry that is added to the task backend.
        Parameters:
        attributes - that will be added to the task backend
      • getTaskObjectclass

        public String getTaskObjectclass()
        Gets the objectclass used to represent scheduled instances of this utility in the task backend.
        Returns:
        String representation of this utilities objectclass
      • getTaskClass

        public Class<?> getTaskClass()
        Gets the Class that implements the utility to execute.
        Returns:
        class of the tasks implementation
      • processLocal

        protected int processLocal​(boolean initializeServer,
                                   PrintStream out,
                                   PrintStream err)
        Called when this utility should perform its actions locally in this JVM.
        Specified by:
        processLocal in class TaskTool
        Parameters:
        initializeServer - indicates whether to initialize the directory server in the case of a local action
        out - stream to write messages; may be null
        err - stream to write messages; may be null
        Returns:
        int indicating the result of this action
      • getTaskId

        public String getTaskId()
        Gets an arbitrary task id assigned to this task.
        Returns:
        assigned task id if any or null otherwise.