Package org.opends.server.tools.dsbackup
Class DsBackup
- java.lang.Object
-
- com.forgerock.opendj.cli.Tool
-
- org.opends.server.tools.dsbackup.DsBackup
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class DsBackup extends com.forgerock.opendj.cli.Tool
dsbackup tool implementation.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
Runs the dsbackup tool with the provided arguments.com.forgerock.opendj.cli.ReturnCode
run(String... args)
Run thisTool
tool with the provided arguments.static Map<String,String>
storagePropertiesAsMap(Collection<String> properties)
Returns a map of storage properties made of properties name/value or an empty map if there are no properties.-
Methods inherited from class com.forgerock.opendj.cli.Tool
askPort, close, confirmAction, enableConsoleLoggingIfVerbose, errPrintln, errPrintln, errPrintln, errPrintlnSurroundedByBlankLines, errPrintVerboseMessage, flush, flushLogStream, getErrorStream, getErrStream, getInputStream, getOutputStream, isFullyInteractive, isQuiet, isScriptFriendly, isVerbose, logVerboseMessage, mayPrompt, parseArguments, pressReturnToContinue, print, println, println, println, printlnNoWrap, printlnSurroundedByBlankLines, printNoWrap, readInput, readInput, readInputAllowEmpty, readLineOfInput, readPassword, readValidatedInput, readValidatedInputOrThrow, report
-
-
-
-
Method Detail
-
main
public static void main(String[] args)
Runs the dsbackup tool with the provided arguments.- Parameters:
args
- The arguments.
-
run
public com.forgerock.opendj.cli.ReturnCode run(String... args) throws com.forgerock.opendj.cli.ClientException
Description copied from class:com.forgerock.opendj.cli.Tool
Run thisTool
tool with the provided arguments. Output and errors will be written on the provided streams.This method can be used to run the tool programmatically.
- Overrides:
run
in classcom.forgerock.opendj.cli.Tool
- Parameters:
args
- Arguments set to pass to the tool.- Returns:
- The tool
ReturnCode
. - Throws:
com.forgerock.opendj.cli.ClientException
- If an error occurs while running the tool.
-
storagePropertiesAsMap
public static Map<String,String> storagePropertiesAsMap(Collection<String> properties)
Returns a map of storage properties made of properties name/value or an empty map if there are no properties. The property must follow the format 'name:value'. Storage properties support only single valued properties: If there are several properties values with the same 'name' (eg. 'name:value1' and 'name:value2') then aLocalizedIllegalArgumentException
is thrown.- Parameters:
properties
- a collection of properties whose format follows the pattern 'name:value'.- Returns:
- the properties as a map of
<name, values>
. - Throws:
LocalizedIllegalArgumentException
- if ever the attributeName has more than one value 'name:value' or one of the property does not respect the pattern 'name:value'.
-
-