8 Backup, Schedule, and Restore Commands
You can use the backup, schedule, and restore commands to automate Oracle Key Vault appliance backups.
- okv backup destination create Command
Theokv backup destination create
command creates a remote backup destination for the Oracle Key Vault server. - okv backup destination delete Command
Theokv backup destination delete
command deletes a remote backup destination. - okv backup destination delete-backup Command
Theokv backup destination delete-backup
command enables you to manually delete a local Oracle Key Vault backup. - okv backup destination get Command
Theokv backup destination get
command gets information about a specific backup destination. - okv backup destination list Command
Theokv backup destination list
command displays a list of the current Oracle Key Vault server backup destinations. - okv backup destination list-backups Command
Theokv backup destination list-backups
command lists the backups that are available for restore operations on a destination. - okv backup destination-policy create Command
Theokv backup destination-policy create
command creates a backup destination policy. - okv backup destination-policy delete Command
Theokv backup destination-policy delete
command deletes a backup destination policy. - okv backup destination-policy get Command
Theokv backup destination-policy get
command retrieves detailed information about a backup destination policy. - okv backup destination-policy list Command
Theokv backup destination-policy list
command lists existing backup destination policies and their settings. - okv backup destination-policy list-purged-backups Command
Theokv backup destination-policy list-purged-backups
command lists the backups purged by a backup destination policy. - okv backup destination-policy update Command
Theokv backup destination-policy update
command updates a backup destination policy. - okv backup destination resume-policy Command
Theokv backup destination resume-policy
command resumes the operation of the backup destination policy that is associated with a specified backup destination. - okv backup destination suspend-policy Command
Theokv backup destination suspend-policy
command suspends the operation of the backup destination policy that is associated with a specified backup destination. - okv backup destination update Command
Theokv backup destination update
command updates the settings of a remote backup destination. - okv backup destination get-public-key Command
Theokv backup destination get-public-key
command retrieves the SSH public key of the Oracle Key Vault internal user used for performing backups. - okv backup destination reset-host-key Command
Theokv backup destination reset-host-key
command resets a destination host's public key in theknown_hosts
file for theoracle
user. - okv backup history list Command
Theokv backup history list
command lists the details of a backup history, such as runtime errors, whether the backup completed, and start and end times. - okv backup schedule create Command
Theokv backup schedule create
command creates a backup schedule job. - okv backup schedule delete Command
Theokv backup schedule delete
command deletes scheduled backup job. - okv backup schedule get Command
Theokv backup schedule get
command retrieves detailed information about a scheduled Oracle Key Vault server backup. - okv backup schedule list Command
Theokv backup schedule list
command displays a listing of the currently scheduled Oracle Key Vault server backups. - okv backup schedule pause Command
Theokv backup schedule pause
command pauses a scheduled Oracle Key Vault server backup. - okv backup schedule resume Command
Theokv backup schedule resume
command resumes a paused Oracle Key Vault backup job. - okv backup schedule delete Command
Theokv backup schedule delete
command deletes scheduled backup job. - okv backup schedule update Command
Theokv backup schedule update
command updates a currently scheduled backup. - okv backup restore start Command
Theokv backup restore start
command starts the restore process of an Oracle Key Vault backup. - okv backup restore status Command
Theokv backup restore status
command checks the status of the Oracle Key Vault backup restore operation.
8.1 okv backup destination create Command
The okv backup destination create
command creates a remote backup destination for the Oracle Key Vault server.
Required Authorization
System Administrator role
Syntax
okv backup destination create --name destination_name --transfer-method scp|sftp --host-name host_name --port port --path destination_path --user-name user_name --authentiation-method password|key-based --destination-policy policy_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "create", "options" : { "name" : "#VALUE", "transferMethod" : "#scp|sftp", "hostName" : "#VALUE", "port" : "#VALUE", "path" : "#VALUE", "userName" : "#VALUE", "authenticationMethod" : "#password|key-based", "destinationPolicy" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name of the backup destination. For a listing of existing names, run the |
|
Required |
Enter one of the following values:
|
|
Required |
Host name or IP address of the remote server for the backup. If you enter the host name, then ensure that DNS is configured to translate the host name to its corresponding IP address. Do not include spaces, single quotation marks, or double quotation marks in a host name that is in a remote backup destination. |
|
Required |
Port number of the destination backup computer. The default is 22. |
|
Required |
Path to an existing directory on the external server where the backup file will be copied. You cannot modify this directory location after the backup destination is created. This path must not be the destination for backups from another Oracle Key Vault server. Do not include spaces, single quotation marks, or double quotation marks destination path that is in a remote backup destination. |
|
Required |
User name of the user account on the remote server. Ensure that this user has the write permissions on the directory specified in the path parameter for the |
|
Required |
Enter one of the following values:
|
|
Optional |
Specifies the name of the backup destination policy. To find existing backup destination policies, run the |
JSON Example
- Generate JSON input for the
okv backup destination create
command.okv backup destination create --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "create", "options" : { "name" : "#VALUE", "transferMethod" : "#scp|sftp", "hostName" : "#VALUE", "port" : "#VALUE", "path" : "#VALUE", "userName" : "#VALUE", "authenticationMethod" : "#password|key-based", "destinationPolicy" : "#VALUE" } } }
- Save the generated input to a file (for example,
bkup_srvr_dest_create.json
) and then edit it to create the backup server destination.{ "service" : { "category" : "backup", "resource" : "destination", "action" : "create", "options" : { "name" : "prod_okv_backup_dest", "transferMethod" : "scp", "hostName" : "192.0.2.34", "port" : "22", "path" : "/opt/okv/backups", "userName" : "psmith", "authenticationMethod" : "password", "destinationPolicy" : "global_dest_pol" } } }
- Run the
okv backup destination create
command using the generated JSON file.okv backup destination create --from-json bkup_srvr_dest_create.json
If you specified
password
for the user authentication method, then you will be prompted for the password. After entering the correct password, output similar to the following appears:Destination User Password: password { "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.2 okv backup destination delete Command
The okv backup destination delete
command deletes a remote backup destination.
Required Authorization
System Administrator role
Syntax
okv backup destination delete --name destination_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "delete", "options" : { "name" : "#VALUE" } } }
Parameters
Parameter/Template | Required? | Description |
---|---|---|
|
Required |
Name of the remote backup destination. To find existing backup names, run the |
JSON Example
- Generate JSON input for the
okv backup destination delete
command.okv backup destination delete --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "delete", "options" : { "name" : "#VALUE" } } }
- Save the generated input to a file (for example,
bkup_srvr_dest_del.json
) and then edit it to delete the backup server destination.{ "service" : { "category" : "backup", "resource" : "destination", "action" : "delete", "options" : { "name" : "prod_okv_backup_dest" } } }
- Run the
okv backup destination delete
command using the generated JSON file.okv backup destination delete --from-json bkup_srvr_dest_del.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.3 okv backup destination delete-backup Command
The okv backup destination delete-backup
command enables you to manually delete a local Oracle Key Vault backup.
Required Authorization
System Administrator role
Syntax
okv backup destination delete-backup --destination backup_destination --backup-file backup_file_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "delete-backup", "options" : { "backupFile" : "#VALUE", "destination" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Specifies the name of the backup destination. Enter The |
|
Required |
Specifies the name of the backup file. To find existing backup file names, run the |
JSON Example
- Generate JSON input for the
okv backup destination delete-backup
command.okv backup destination delete-backup --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "delete-backup", "options" : { "backupFile" : "#VALUE", "destination" : "#VALUE" } } }
- Save the generated input to a file (for example,
backup_local_del.json
) and then edit it to specify the backup file name and backup destination name (that is,local
).{ "service" : { "category" : "backup", "resource" : "destination", "action" : "delete-backup", "options" : { "backupFile" : "okvbackup_onetime_onetime_20210118175804", "destination" : "local" } } }
- Run the
okv backup destination delete-backup
command using the generated JSON file.okv backup destination delete-backup --from-json backup_local_del.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.4 okv backup destination get Command
The okv backup destination get
command gets information about a specific backup destination.
Required Authorization
System Administrator role
Syntax
okv backup destination get --name backup_destination_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "get", "options" : { "name" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name of the backup destinination. For a listing of existing names, run the |
JSON Example
- Generate JSON input for the
okv backup destination get
command.okv backup destination get --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "get", "options" : { "name" : "#VALUE" } } }
- Save the generated input to a file (for example,
bkup_srvr_dest_get.json
) and then edit it to retrieve the backup server destination.{ "service" : { "category" : "backup", "resource" : "destination", "action" : "get", "options" : { "name" : "prod_okv_backup_dest" } } }
- Run the
okv backup destination get
command using the generated JSON file.okv backup destination get --from-json bkup_srvr_dest_get.json
Output similar to the following appears:
{ "result" : "Success", "value" : { "authenticationMethod" : "Password", "hostName" : "192.0.2.34", "name" : "PROD_OKV_BACKUP_DEST", "path" : "/opt/okv/backups", "policyName" : "GLOBAL_DEST_POL", "policyState" : "Active", "port" : "22", "transferMethod" : "scp", "userName" : "psmith" } }
Parent topic: Backup, Schedule, and Restore Commands
8.5 okv backup destination list Command
The okv backup destination list
command displays a list of the current Oracle Key Vault server backup destinations.
Required Authorization
System Administrator role
Syntax
okv backup destination list
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "list" } }
Parameters
None
JSON Example
- Generate JSON input for the
okv backup destination list
command.okv backup destination list --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "list" } }
- Save the generated input to a file (for example,
bkup_srvr_dest_list.json
). - Run the
okv backup destination list
command using the generated JSON file.okv backup destination list --from-json bkup_srvr_dest_list.json
Output similar to the following appears:
{ "result" : "Success", "destinations" : [ { "authenticationMethod" : " ", "hostName" : "localhost", "name" : "LOCAL", "path" : "-", "transferMethod" : "-", "userName" : "-" }, { "authenticationMethod" : "Password", "hostName" : "192.0.2.34", "name" : "PROD_OKV_BACKUP_DEST", "path" : "/opt/okv/backups", "port" : "22", "transferMethod" : "scp", "userName" : "psmith" } ] }
Parent topic: Backup, Schedule, and Restore Commands
8.6 okv backup destination list-backups Command
The okv backup destination list-backups
command lists the backups that are available for restore operations on a destination.
Required Authorization
System Administrator role
Syntax
okv backup destination list-backups --name destination_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "list-backups", "options" : { "name" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name of the backup destination. To find existing backup destination names, run the |
JSON Example
- Generate JSON input for the
okv backup destination list-backups
command.okv backup destination list-backups --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "list-backups", "options" : { "name" : "#VALUE" } } }
- Save the generated input to a file (for example,
dest_list_backups.json
) and then edit it to list the backup server destinations.{ "service" : { "category" : "backup", "resource" : "destination", "action" : "list-backups", "options" : { "name" : "prod_okv_backup_dest" } } }
- Run the
okv backup destination list-backups
command using the generated JSON file.okv backup destination list-backups --from-json dest_list_backups.json
Output similar to the following appears:
{ "result" : "Success", "backups" : [ { "file" : "okvbackup_periodic_incr_20211030162206", "time" : "2021-10-30 16:22:06", "type" : "Periodic" }, { "file" : "okvbackup_periodic_full_20211029162206", "time" : "2021-10-29 16:22:06", "type" : "Periodic" }, { "file" : "okvbackup_onetime_onetime_20211028012206", "time" : "2021-10-28 01:22:06", "type" : "One-Time" } ] }
Parent topic: Backup, Schedule, and Restore Commands
8.7 okv backup destination-policy create Command
The okv backup destination-policy create
command creates a backup destination policy.
Required Authorization
System Administrator role
Syntax
okv backup destination-policy create --destination-policy policy_name --recent-backups-to-preserve number_of_recent_backups_to_preserve --purge-backup-after number_of_days_after_which_backup_purged
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "create", "options" : { "destinationPolicy" : "#VALUE", "recentBackupsToPreserve" : "#VALUE", "purgeBackupAfter" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Specifies the name of the backup destination policy to create. To find existing backup destination policies, run the |
|
Optional |
The number of the most recent backups to preserve. Enter a value from |
|
Optional |
Specifies the number of days after which a backup is eligible to be purged. Enter a value from Enter this value using the ISO 8601 standard. For example, enter |
JSON Example
- Generate JSON input for the
okv backup destination-policy create
command.okv backup destination-policy create --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "create", "options" : { "destinationPolicy" : "#VALUE", "recentBackupsToPreserve" : "#VALUE", "purgeBackupAfter" : "#VALUE" } } }
- Save the generated input to a file (for example,
backup_dest_policy_create.json
) and then edit it to create the backup destination policy.{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "create", "options" : { "destinationPolicy" : "global_dest_pol", "recentBackupsToPreserve" : "15", "purgeBackupAfter" : "P45D" } } }
- Run the
okv backup destination-policy create
command using the generated JSON file.okv backup destination-policy create --from-json backup_dest_policy_create.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.8 okv backup destination-policy delete Command
The okv backup destination-policy delete
command deletes a backup destination policy.
Required Authorization
System Administrator role
Syntax
okv backup destination-policy delete --destination_policy policy_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "delete", "options" : { "destinationPolicy" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Specifies the name of the backup destination policy to delete. To find existing backup destination policies, run the |
JSON Example
- Generate JSON input for the
okv backup destination-policy delete
command.okv backup destination-policy delete --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "delete", "options" : { "destinationPolicy" : "#VALUE" } } }
- Save the generated input to a file (for example,
backup_dest_policy_delete.json
) and then edit it to specify the backup destination policy to delete.{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "delete", "options" : { "destinationPolicy" : "global_dest_pol" } } }
- Run the
okv backup destination-policy delete
command using the generated JSON file.okv backup destination-policy delete --from-json backup_dest_policy_delete.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.9 okv backup destination-policy get Command
The okv backup destination-policy get
command retrieves detailed information about a backup destination policy.
Required Authorization
System Administrator role
Syntax
okv backup destination-policy get --destination-policy policy_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "get", "options" : { "destinationPolicy" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Specifies the name of the backup destination policy to retrieve. To find existing backup destination policies, run the |
JSON Example
- Generate JSON input for the
okv backup destination-policy get
command.okv backup destination-policy get --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "get", "options" : { "destinationPolicy" : "#VALUE" } } }
- Save the generated input to a file (for example,
backup_dest_policy_get.json
) and then edit it to retrieve the backup destination policy.{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "get", "options" : { "destinationPolicy" : "global_dest_pol" } } }
- Run the
okv backup destination-policy get
command using the generated JSON file.okv backup destination-policy get --from-json backup_dest_policy_get.json
Output similar to the following appears:
{ "result" : "Success", "value" : { "destinationPolicy" : "GLOBAL_DEST_POL", "purgeBackupAfter" : "P45D", "recentBackupsToPreserve" : "15" } }
Parent topic: Backup, Schedule, and Restore Commands
8.10 okv backup destination-policy list Command
The okv backup destination-policy list
command lists existing backup destination policies and their settings.
Required Authorization
System Administrator role
Syntax
okv backup destination-policy list
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "list" } }
Parameters
No parameters
JSON Example
- Generate JSON input for the
okv backup destination-policy list
command.okv backup destination-policy list --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "list" } }
- Save the generated input to a file (for example,
backup_dest_policy_list.json
). - Run the
okv backup destination-policy list
command using the generated JSON file.okv backup destination-policy list --from-json backup_dest_policy_list.json
Output similar to the following appears:
{ "result" : "Success", "value" : { "destinationPolicies" : [ { "destinationPolicy" : "GLOBAL_DEST_POL", "recentBackupsToPreserve" : "15", "purgeBackupAfter" : "P45D" }, { "destinationPolicy" : "RAC_DEST_POL", "recentBackupsToPreserve" : "5", "purgeBackupAfter" : "P60D" } ], "fetchedDestinationPolicyCount" : "2" } }
Parent topic: Backup, Schedule, and Restore Commands
8.11 okv backup destination-policy list-purged-backups Command
The okv backup destination-policy list-purged-backups
command lists the backups purged by a backup destination policy.
Required Authorization
System Administrator role
Syntax
okv backup destination-policy list-purged-backups --destination-policy policy_name --destination destination_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "list-purged-backups", "options" : { "destinationPolicy" : "#VALUE", "destination" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Specifies the name of the backup destination policy that you want to list purged backups for. To find existing backup destination policies, run the |
|
Optional |
Name of the remote backup destination. To find existing backup destination names, run the |
JSON Example
- Generate JSON input for the
okv backup destination-policy list-purged-backups
command.okv backup destination-policy list-purged-backups --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "list-purged-backups", "options" : { "destinationPolicy" : "#VALUE", "destination" : "#VALUE" } } }
- Save the generated input to a file (for example,
backup_dest_policy_list_purged.json
) and then edit it to include the backup destination policy name and backup destination name.{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "list-purged-backups", "options" : { "destinationPolicy" : "global_dest_pol", "destination" : "prod_okv_backup_dest" } } }
- Run the
okv backup destination-policy list-purged-backups
command using the generated JSON file.okv backup destination-policy list-purged-backups --from-json backup_dest_policy_list_purged.json
Output similar to the following appears:
{ "result" : "Success", "value" : { "fetchedPurgedBackupCount" : "2", "purgedBackups" : [ { "backupFile" : "okvbackup_periodic_incr_20211030162206", "status" : "Purged", "purgeTime" : "2021-12-14 19:15:06", "destination" : "PROD_OKV_BACKUP_DEST", "hostName" : "192.0.2.34", "port" : "22", "userName" : "psmith", "path" : "/opt/okv/backups" }, { "backupFile" : "okvbackup_onetime_onetime_20211028012206", "status" : "Unknown", "purgeTime" : "2021-12-12 17:38:06", "destination" : "PROD_OKV_BACKUP_DEST", "hostName" : "192.0.2.34", "port" : "22", "userName" : "psmith", "path" : "/opt/okv/backups" } ] } }
Parent topic: Backup, Schedule, and Restore Commands
8.12 okv backup destination-policy update Command
The okv backup destination-policy update
command updates a backup destination policy.
Required Authorization
System Administrator role
Syntax
okv backup destination-policy update --destination-policy policy_name --recent-backups-to-preserve number_of_recent_backups_to_preserve --purge-backup-after number_of_days_after_which_backup_purged
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "update", "options" : { "destinationPolicy" : "#VALUE", "recentBackupsToPreserve" : "#VALUE", "purgeBackupAfter" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Specifies the name of the backup destination policy to update. To find existing backup destination policies, run the |
|
Optional |
The number of the most recent backups to preserve. Enter a value from |
|
Optional |
Specifies the number of days after which a backup is eligible to be purged. Enter a value from Enter this value using the ISO 8601 standard. For example, enter |
JSON Example
- Generate JSON input for the
okv backup destination-policy update
command.okv backup destination-policy update --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "update", "options" : { "destinationPolicy" : "#VALUE", "recentBackupsToPreserve" : "#VALUE", "purgeBackupAfter" : "#VALUE" } } }
- Save the generated input to a file (for example,
backup_dest_policy_update.json
) and then edit it to update the backup destination policy.{ "service" : { "category" : "backup", "resource" : "destination-policy", "action" : "update", "options" : { "destinationPolicy" : "global_dest_pol", "recentBackupsToPreserve" : "20", "purgeBackupAfter" : "P60D" } } }
- Run the
okv backup destination-policy update
command using the generated JSON file.okv backup destination-policy update --from-json backup_dest_policy_update.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.13 okv backup destination resume-policy Command
The okv backup destination resume-policy
command resumes the operation of the backup destination policy that is associated with a specified backup destination.
Required Authorization
System Administrator role
Syntax
okv backup destination resume-policy --destination destination_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "resume-policy", "options" : { "destination" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Specifies the name of the backup destination. For a listing of existing destination names, run the |
JSON Example
- Generate JSON input for the
okv backup destination resume-policy
command.okv backup destination resume-policy --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "resume-policy", "options" : { "destination" : "#VALUE" } } }
- Save the generated input to a file (for example,
backup_dest_pol_resume.json
) and then edit it to specify the backup destination policy to resume.{ "service" : { "category" : "backup", "resource" : "destination", "action" : "resume-policy", "options" : { "destination" : "prod_okv_backup_dest" } } }
- Run the
okv backup destination resume-policy
command using the generated JSON file.okv backup destination resume-policy --from-json backup_dest_pol_resume.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.14 okv backup destination suspend-policy Command
The okv backup destination suspend-policy
command suspends the operation of the backup destination policy that is associated with a specified backup destination.
Required Authorization
System Administrator role
Syntax
okv backup destination suspend-policy --destination destination_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "suspend-policy", "options" : { "destination" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name of the backup destination. For a listing of existing backup destination names, run the |
JSON Example
- Generate JSON input for the
okv backup destination suspend-policy
command.okv backup destination suspend-policy --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "suspend-policy", "options" : { "destination" : "#VALUE" } } }
- Save the generated input to a file (for example,
backup_dest_pol_suspend.json
) and then edit it to specify the backup destination policy to suspend.{ "service" : { "category" : "backup", "resource" : "destination", "action" : "suspend-policy", "options" : { "destination" : "prod_okv_backup_dest" } } }
- Run the
okv backup destination suspend-policy
command using the generated JSON file.okv backup destination suspend-policy --from-json backup_dest_pol_suspend.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.15 okv backup destination update Command
The okv backup destination update
command updates the
settings of a remote backup destination.
Required Authorization
System Administrator role
Syntax
okv backup destination update --name destination_name --port port --user-name user_name --authentication-method authentication_method --destination-policy destination_policy_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "update", "options" : { "name" : "#VALUE", "port" : "#VALUE", "userName" : "#VALUE", "authenticationMethod" : "#password|key-based", "destinationPolicy" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name of the backup destination. For a listing of existing backup destination names, run the |
|
Optional |
Port number of the destination backup computer. The default is 22. |
|
Optional |
User name of the user account on the remote server. Ensure that this user has the write permissions on the directory specified in the path parameter for the |
|
Optional |
Enter one of the following values:
|
|
Optional |
Specifies the backup destination policy. To find existing backup destination policies, run the |
Example
- Generate JSON input for the
okv backup destination update
command.okv backup destination update --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "update", "options" : { "name" : "#VALUE", "port" : "#VALUE", "userName" : "#VALUE", "authenticationMethod" : "#password|key-based", "destinationPolicy" : "#VALUE" } } }
- Save the generated input to a file (for example,
update_bkup_srvr_dest.json
) and then edit it to update the backup server destination.{ "service" : { "category" : "backup", "resource" : "destination", "action" : "update", "options" : { "name" : "prod_okv_backup_dest", "port" : "22", "userName" : "psmith", "authenticationMethod" : "password", "destinationPolicy" : "rac_dest_pol" } } }
- Run the
okv backup destination update
command using the generated JSON file.okv backup destination update --from-json update_bkup_srvr_dest.json
If you specified
password
for the user authentication method, then you will be prompted for the password. After entering the correct password, output similar to the following appearsDestination User Password: password { "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.16 okv backup destination get-public-key Command
The okv backup destination get-public-key
command retrieves the SSH public key of the Oracle Key Vault internal user used for performing backups.
Copy the public key from the output of this command and paste it in the appropriate configuration file, such as authorized_keys
of the backup destination user account, on the backup destination server. Check that the permissions of the configuration file are set to allow access only to the backup user account and to no other group or user. Be aware that certain events may trigger a change of the public key, which means that Oracle Key Vault cannot use the backup destination until the new public key is re-copied from Oracle Key Vault to the appropriate configuration file. These events include but are not limited to certificate rotation, changing the IP address, and conversion to a cluster node.
Required Authorization
System Administrator role
Syntax
okv backup destination get-public-key
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "get-public-key" } }
Parameters
None
JSON Example
- Generate JSON input for the
okv backup destination get-public-key
okv backup destination get-public-key --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "get-public-key" } }
- Save the generated input to a file (for example,
bkup_dest_get_public_key.json
). - Run the
okv backup destination get-public-key
command using the generated JSON file.okv backup destination get-public-key --from-json bkup_dest_get_public_key.json
Output similar to the following appears:
{ "result" : "Success", "value" : { "object" : "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRLparTgrf5F2IExZ1IMZecobMw2ptj5WWlr6l2ww9GHZ5YgMiTNBCiAjr68KgLgJ9eRkOSSz7tsnYzcw8th45abB344LzMBLREqtqbV4U0PYHMmt1ovhd+djhsYnJbXptfiSAfe2f+1/XPlIYcZNo3m5imffgaIsrn9WlIYxOnP7rrZW3mQkPRLADElTAMWl7zDj71mZrenNBInTd70CBX/L7C4NABikPu1E7TxpASQRW9y/n5zdGR4TVww06nAEseCfwfzV1ToNK7CFwFWv/OdIARVVSqwCkCDrwP/pNYr7WjzXR939xBfuXaWNZpoDkN1Yxb5sk1NEYRT+cs/SD\n" } }
Parent topic: Backup, Schedule, and Restore Commands
8.17 okv backup destination reset-host-key Command
The okv backup destination reset-host-key
command resets a destination host's public key in the known_hosts
file for the oracle
user.
Required Authorization
System Administrator role
Syntax
okv backup destination reset-host-key --name destination_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "reset-host-key", "options" : { "name" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name of the backup destination. To find existing backup destination names, run the |
JSON Example
- Generate JSON input for the
okv backup destination reset-host-key
command.okv backup destination reset-host-key --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "destination", "action" : "reset-host-key", "options" : { "name" : "#VALUE" } } }
- Save the generated input to a file (for example,
reset_host_key.json
) and then edit it to reset the host key for the destination server.{ "service" : { "category" : "backup", "resource" : "destination", "action" : "reset-host-key", "options" : { "name" : "prod_okv_backup_dest" } } }
- Run the
okv backup destination reset-host-key
command using the generated JSON file.okv backup destination reset-host-key --from-json reset_host_key.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.18 okv backup history list Command
The okv backup history list
command lists the details of a backup history, such as runtime errors, whether the backup completed, and start and end times.
Required Authorization
System Administrator role
Syntax
okv backup history list --max number_of_backup_records
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "history", "action" : "list", "options" : { "max" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
The maximum number of the most recent complete backup information records that should be returned |
JSON Example
- Generate JSON input for the
okv backup history list
command.okv backup history list --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "history", "action" : "list", "options" : { "max" : "#VALUE" } } }
- Save the generated input to a file (for example,
bkup_history_list.json
) and then edit it to generate the backup history list.{ "service" : { "category" : "backup", "resource" : "history", "action" : "list", "options" : { "max" : "10" } } }
- Run the
okv backup history list
command using the generated JSON file.okv backup history list --from-json bkup_history_list.json
Output similar to the following appears:
{ "result" : Success", "backups": [ { "backupTime": "2020-11-30 03:59:36", "destination": "PROD_OKV_BACKUP_DEST", "interval": "0:1:0", "lastFullBackupTime": "2020-11-30 01:27:31", "name": "OKV_BACKUP_HOURLY", "runError": " ", "runIndex": "2", "scheduleTime": "2020-11-30 01:09:56", "startTime": "2020-11-30 03:42:09", "status": "DONE", "type": "PERIODIC" }, { "backupTime": "2020-11-30 02:13:36", "destination": "LOCAL", "interval": "0:0:0", "lastFullBackupTime": "2020-11-30 02:13:36", "name": "LOCAL_BACKUP", "runError": " ", "runIndex": "1", "scheduleTime": "2020-11-30 01:40:28", "startTime": "2020-11-30 02:00:02", "status": "DONE", "type": "ONE-TIME" }, { "backupTime": "2020-11-30 01:27:31", "destination": "PROD_OKV_BACKUP_DEST", "interval": "0:1:0", "lastFullBackupTime": "2020-11-30 01:27:31", "name": "OKV_BACKUP_HOURLY", "runError": " ", "runIndex": "1", "scheduleTime": "2020-11-30 01:09:56", "startTime": "2020-11-30 01:10:00", "status": "DONE", "type": "PERIODIC" } ] }
Parent topic: Backup, Schedule, and Restore Commands
8.19 okv backup schedule create Command
The okv backup schedule create
command creates a backup schedule job.
Required Authorization
System Administrator role
Syntax
okv backup schedule create --name backup_schedule_name --start-time start_time --destination LOCAL|VALUE --type ONE-TIME|PERIODIC --interval timing
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "create", "options" : { "name" : "#VALUE", "startTime" : "#VALUE", "type" : "#ONE-TIME|PERIODIC", "destination" : "#LOCAL|VALUE", "interval" : { "days" : "#0-99", "hours" : "#0-23", "mins" : "#0-59" } } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name for the backup schedule job. To find existing scheduled backups, run the |
|
Required |
Time to begin the scheduled backup. You can use different ways to set the date and time. Examples are as follows:
To display the time in UTC format, use the Linux
|
|
Required |
Type or name of backup destination. Enter one of the following values:
|
|
Required |
Enter one of the following values:
|
|
Required for periodic backups |
Enter the days, hours, and minutes in between the backups, using the following format:
|
JSON Example
- Generate JSON input for the
okv backup schedule create
command.okv backup schedule create --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "create", "options" : { "name" : "#VALUE", "startTime" : "#VALUE", "type" : "#ONE-TIME|PERIODIC", "destination" : "#LOCAL|VALUE", "interval" : { "days" : "#0-99", "hours" : "#0-23", "mins" : "#0-59" } } } }
- Save the generated input to a file (for example,
bkup_sched_create.json
) and then edit it to create the backup schedule.{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "create", "options" : { "name" : "okv_backup_hourly", "startTime" : "2020-11-30 01:10:00", "type" : "PERIODIC", "destination" : "prod_okv_backup_dest", "interval" : { "days" : "0", "hours" : "1", "mins" : "0" } } } }
- Run the
okv backup schedule create
command using the generated JSON file.okv backup schedule create --from-json bkup_sched_create.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.20 okv backup schedule delete Command
The okv backup schedule delete
command deletes scheduled backup job.
Required Authorization
System Administrator role
Syntax
okv backup schedule delete --name backup_schedule_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "delete", "options" : { "name" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name of the backup schedule job. To find existing scheduled backups, run the |
JSON Example
- Generate JSON input for the
okv backup schedule delete
command.okv backup schedule delete --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "delete", "options" : { "name" : "#VALUE" } } }
- Save the generated input to a file (for example,
bkup_sched_del.json
) and then edit it so that you can delete the backup schedule.{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "delete", "options" : { "name" : "okv_backup_hourly" } } }
- Run the
okv backup schedule delete
command using the generated JSON file.okv backup schedule delete --from-json bkup_sched_del.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.21 okv backup schedule get Command
The okv backup schedule get
command retrieves detailed information about a scheduled Oracle Key Vault server backup.
The okv backup schedule get
command returns the following values:
- Type (for example,
periodically @ 1 days 0 hrs 0 mins
) - Destination (for example,
local
orremote-dest
) - State (
ACTIVE
,ONGOING
,PAUSED
,DONE
) - Last run error
- Schedule time
- Start time
- Last backup time
- Last full backup time
- Run count (for periodic backups)
Required Authorization
System Administrator role
Syntax
okv backup schedule get --name backup_schedule_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "get", "options" : { "name" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name of the backup schedule job. To find existing scheduled backups, run the |
JSON Example
- Generate JSON input for the
okv backup schedule get
command.okv backup schedule get --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "get", "options" : { "name" : "#VALUE" } } }
- Save the generated input to a file (for example,
bkup_sched_get.json
) and then edit it to get the backup schedule.{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "get", "options" : { "name" : "okv_backup_hourly" } } }
- Run the
okv backup schedule get
command using the generated JSON file.okv backup schedule get --from-json bkup_sched_get.json
Output similar to the following appears:
{ "result" : "Success", "value" : { "destination" : "PROD_OKV_BACKUP_DEST", "interval" : "0:1:0", "name" : "OKV_BACKUP_HOURLY", "runIndex" : "0", "scheduleTime" : "2021-01-16 18:37:15", "startTime" : "2021-03-31 18:36:00", "status" : "ACTIVE", "type" : "PERIODIC" } }
Parent topic: Backup, Schedule, and Restore Commands
8.22 okv backup schedule list Command
The okv backup schedule list
command displays a listing of the currently scheduled Oracle Key Vault server backups.
Required Authorization
System Administrator role
Syntax
okv backup schedule list
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "list" } }
Parameters
None
JSON Example
- Generate JSON input for the
okv backup schedule list
command.okv backup schedule list --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "list" } }
- Save the generated input to a file (for example,
bkup_sched_list.json
). - Run the
okv backup schedule list
command using the generated JSON file.okv backup schedule list --from-json bkup_sched_list.json.json
Output similar to the following appears:
{ "result" : "Success", "value" : { "schedules" : [ "OKV_BACKUP_HOURLY", "LOCAL_BACKUP" ] } }
Parent topic: Backup, Schedule, and Restore Commands
8.23 okv backup schedule pause Command
The okv backup schedule pause
command pauses a scheduled Oracle Key Vault server backup.
Required Authorization
System Administrator role
Syntax
okv backup schedule pause --name backup_schedule_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "pause", "options" : { "name" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name of the backup schedule job. To find existing scheduled backups, run the |
JSON Example
- Generate JSON input for the
okv backup schedule pause
command.okv backup schedule pause --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "pause", "options" : { "name" : "#VALUE" } } }
- Save the generated input to a file (for example,
bkup-sched-pause.json
) and then edit it so that you can pause the backup schedule.{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "pause", "options" : { "name" : "okv_backup_hourly" } } }
- Run the
okv backup schedule pause
command using the generated JSON file.okv backup schedule pause --from-json bkup-sched-pause.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.24 okv backup schedule resume Command
The okv backup schedule resume
command resumes a paused Oracle Key Vault backup job.
Required Authorization
System Administrator role
Syntax
okv backup schedule resume --name backup_schedule_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "resume", "options" : { "name" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name of the backup schedule job. To find existing scheduled backups, run the |
JSON Example
- Generate JSON input for the
okv backup schedule resume
command.okv backup schedule resume --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "resume", "options" : { "name" : "#VALUE" } } }
- Save the generated input to a file (for example,
bkup_sched_resume.json
) and then edit it to resume the paused backup schedule.{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "resume", "options" : { "name" : "okv_backup_hourly" } } }
- Run the
okv backup schedule resume
command using the generated JSON file.okv backup schedule resume --from-json bkup_sched_resume.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.25 okv backup schedule delete Command
The okv backup schedule delete
command deletes scheduled backup job.
Required Authorization
System Administrator role
Syntax
okv backup schedule delete --name backup_schedule_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "delete", "options" : { "name" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name of the backup schedule job. To find existing scheduled backups, run the |
JSON Example
- Generate JSON input for the
okv backup schedule delete
command.okv backup schedule delete --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "delete", "options" : { "name" : "#VALUE" } } }
- Save the generated input to a file (for example,
bkup_sched_del.json
) and then edit it to delete the backup schedule.{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "delete", "options" : { "name" : "okv_backup_hourly" } } }
- Run the
okv backup schedule delete
command using the generated JSON file.okv backup schedule delete --from-json bkup_sched_del.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.26 okv backup schedule update Command
The okv backup schedule update
command updates a currently scheduled backup.
Required Authorization
System Administrator role
Syntax
okv backup schedule update --name backup_schedule_name --start-time start_time --interval timing
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "update", "options" : { "name" : "#VALUE", "startTime" : "#VALUE", "interval" : { "days" : "#0-99", "hours" : "#0-23", "mins" : "#0-59" } } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name of the backup schedule job. To find the names of existing scheduled backups, run the |
|
Optional |
Time to begin the scheduled backup. You can use different ways to set the date and time. Examples are as follows:
To display the time in UTC format, use the Linux
|
|
Required for periodic backups |
Enter the days, hours, and minutes in between the backups, using the following format:
|
JSON Example
- Generate JSON input for the
okv backup schedule update
command.okv backup schedule update --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "update", "options" : { "name" : "#VALUE", "startTime" : "#VALUE", "interval" : { "days" : "#0-99", "hours" : "#0-23", "mins" : "#0-59" } } } }
- Save the generated input to a file (for example,
bkup_sched_update.json
) and then edit it to update the backup schedule.{ "service" : { "category" : "backup", "resource" : "schedule", "action" : "update", "options" : { "name" : "okv_backup_hourly", "startTime" : "2020-12-20 18:00:00", "interval" : { "days" : "0", "hours" : "12", "mins" : "0" } } } }
- Run the
okv backup schedule update
command using the generated JSON file.okv backup schedule update --from-json bkup_sched_update.json
Output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.27 okv backup restore start Command
The okv backup restore start
command starts the restore process of an Oracle Key Vault backup.
This command will require the use of the Oracle Key Vault recovery passphrase.
Required Authorization
System Administrator role
After you begin the restore operation, you can check its status by running the okv backup restore status
command.
Syntax
okv backup restore start --name backup_file_name --destination destination_name
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "restore", "action" : "start", "options" : { "name" : "#VALUE", "destination" : "#VALUE" } } }
Parameters
Parameter/Template Parameter | Required? | Description |
---|---|---|
|
Required |
Name for the backup file. To find existing scheduled backups, run the |
|
Required |
Name of the backup destination. For a listing of existing names, run the |
JSON Example
- Generate JSON input for the
okv backup restore start
command.okv backup restore start --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "restore", "action" : "start", "options" : { "name" : "#VALUE", "destination" : "#VALUE" } } }
- Save the generated input to a file (for example,
bkup_restore_start.json
) and then edit it to start the restore of a backup. In the following example, thepassphrase
is not specified so that the user will be prompted interactively for it.{ "service" : { "category" : "backup", "resource" : "restore", "action" : "start", "options" : { "name" : "okvbackup_onetime_onetime_20210118175804", "destination" : "prod_okv_backup_dest" } } }
- Run the
okv backup restore start
command using the generated JSON file.okv backup restore start --from-json bkup_restore_start.json
You will be prompted to enter the recovery passphrase, which must be the one that was effective at the time of the backup that is being restored. After you enter this passphrase, output similar to the following appears:
{ "result" : "Success" }
Parent topic: Backup, Schedule, and Restore Commands
8.28 okv backup restore status Command
The okv backup restore status
command checks the status of the Oracle Key Vault backup restore operation.
Required Authorization
System Administrator role
Syntax
okv backup restore status
JSON Input File Template
{ "service" : { "category" : "backup", "resource" : "restore", "action" : "status" } }
Parameters
None
JSON Example
- Generate JSON input for the
okv backup restore status
command.okv backup restore status --generate-json-input
The generated input appears as follows:
{ "service" : { "category" : "backup", "resource" : "restore", "action" : "status" } }
- Save the generated input to a file (for example,
bkup_restore_status.json
). - Run the
okv backup restore status
command using the generated JSON file.okv backup restore status --from-json bkup_restore_status.json
If restore is ongoing, then output similar to the following appears:
{ "result" : "Success", "value" : { "destination" : "LOCAL", "status" : "ONGOING", "time" : "2020-12-18 11:49:30" } }
If restore is complete, then output similar to the following appears:
{ "result" : "Success", "value" : { "destination" : "LOCAL", "status" : "DONE", "time" : "2020-12-18 11:52:02" } }
Parent topic: Backup, Schedule, and Restore Commands