oadp restore posthooks

Run restore post-hooks.

Syntax

cpd-cli oadp restore posthooks \
[--aux-service-image-prefix=<backup-hook-image-prefix>] \
[--dry-run=true|false] \
[--hook-kind=prehook|posthook|checkpoint] \
[--include-namespaces=<project-name1,project-name2,...>] \
[--log-level=info|debug|warn|error|panic] \
[--namespace=<namespace-name>] \
[--scale-always] \
[--scale-wait-timeout=<h,m,s>] \
[--values=<yaml-file-name1,yaml-file-name2,...>] \
[--verbose]

Arguments

The restore posthooks command has no arguments.

Options

Option Description
--aux-service-image-prefix Specify the backup hook job image prefix (if configurable).
Status
Optional.
Syntax
--aux-service-image-prefix=<backup-hook-image-prefix>
Default value
icr.io/cpopen/cpd
Valid values
  • icr.io/cpopen/cpd
  • ${PRIVATE_REGISTRY_LOCATION}
--dry-run Executes a dry-run without running the command.
Status
Optional.
Syntax
--dry-run=true|false
Default value
false
Valid values
false
A dry-run is not executed before running the command.
true
A dry-run is executed before running the command.

--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.
--hook-kind The backup hook type. By default, backup configmap pre-hook and post-hooks are called and are used for offline backups. When the value is "checkpoint", checkpoint backup pre-hook and post-hooks are called and are used for non-disruptive backups.
Status
Optional.
Syntax
--hook-kind=prehook|posthook|checkpoint
Default value
prehook|posthook
Valid values
prehook|posthook
The backup configmap precooks and pothooks are called (used for offline backups).
checkpoint
The checkpoint precooks and pothooks are called (used for non-disruptive backups).
--include-namespaces The namespaces in which to run restore post-hooks.
Status
Optional.
Syntax
--include-namespaces=<project-name1,project-name2,...>
Default value
${PROJECT_CPD_INSTANCE}
Valid values
Any valid project names. (Comma separated string array.)
--log-level The command log level.
Status
Optional.
Syntax
--log-level=info|debug|warn|error|panic
Default value
info
Valid values
debug
Debug messages are written to the log.
error
Error messages are written to the log.
info
Informative messages are written to the log.
panic
Panic messages are written to the log.
warn
Warning messages are written to the log.

--namespace

-n

The namespace name in which the utility should operate.
Status
Optional.
Syntax
--namespace=<namespace-name>
Default value
${PROJECT_CPD_INSTANCE}
Valid values
A valid project (namespace) name.
--scale-always Unquiesce via scale down.
Status
Optional.
Syntax
--scale-always
Default value
No default.
Valid values
Not applicable.
--scale-wait-timeout The scale wait timeout duration ('h' for hours, 'm' for minutes, 's' for seconds).
Status
Optional.
Syntax
--scale-wait-timeout=<h,m,s>
Default value
6m0s
Valid values
Any valid duration string. Examples: 1m, 30m, 1h, 2h45m

--values

-r

Specify values in one or more YAML files.
Status
Optional.
Syntax
--values=<yaml-file-name1,yaml-file-name2,...>
Default value
No default.
Valid values
One or more YAML file names.
--verbose Logs include more detailed messages.
Status
Optional.
Syntax
--verbose
Default value
No default.
Valid values
Not applicable.

Examples

Note: The following examples use the recommended installation environment variables.

Use a script to create environment variables with the correct values for your environment. For more information, see Best practice: Setting up install variables.

Run restore post-hooks.
cpd-cli oadp restore posthooks \
--aux-service-image-prefix=icr.io/cpopen/cpd \
--hook-kind=checkpoint
--namespace=${PROJECT_CPD_INSTANCE}
Run restore post-hooks to investigate errors.
cpd-cli oadp restore posthooks \
--include-namespaces=${PROJECT_CPD_INSTANCE} \
--log-level=debug \
--verbose