backup-restore
snapshot-restore create
Create a volume snapshot
restore.
Syntax
cpd-cli backup-restore snapshot-restore create <volume-snapshot-restore-name> \
[--cleanup-completed-resources=true|false] \
[--dry-run=true|false] \
[--from-snapshot=<volume-snapshot-backup-file-name>] \
[--image-prefix=<image-registry-prefix>] \
[--log-level=info|debug|warn|error|panic] \
[--namespace=<namespace-name>] \
[--scale-wait-timeout=<h,m,s>] \
[--skip-quiesce=true|false] \
[--wait-timeout=<h,m,s>] \
[--verbose]
Arguments
Table 1: Command arguments
Argument | Description |
---|---|
<volume-snapshot-restore-name> |
The name of the volume to create a volume snapshot restore for. |
Options
Option | Description |
---|---|
--cleanup-completed-resources |
When set to "true", deletes
completed Kubernetes jobs and pods.
|
--dry-run |
Executes a dry-run without running
the command.
|
|
The snapshot or backup name from
which to restore.
|
|
Display command
help.
|
--image-prefix |
Specify the image registry
prefix.
|
--log-level |
The command log
level.
|
|
The namespace name in which the
utility should operate.
|
--scale-wait-timeout |
The scale wait timeout duration
('h' for hours, 'm' for minutes, 's' for seconds).
|
--skip-quiesce |
Skip quiesce and unquiesce
steps.
|
--wait-timeout |
The wait timeout setting ('h' for
hours, 'm' for minutes, 's' for seconds).
|
--verbose |
Logs include more detailed
messages.
|
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.
- Pass the
--dry-run
option to validate the restore before running it. - The command reports jobs or pods that are still attached to the PVCS to be
restored.
cpd-cli backup-restore snapshot-restore create <volume-snapshot-restore-name> \ --namespace=${PROJECT_CPD_INSTANCE} \ --from-snapshot=<volume-snapshot-backup-file-name> \ --dry-run=true
- Create a volume snapshot restore after the dry run.
-
cpd-cli backup-restore snapshot-restore create <volume-snapshot-restore-name> \ --namespace=${PROJECT_CPD_INSTANCE} \ --from-snapshot=<volume-snapshot-backup-file-name>