10 Backup, Schedule, and Restore Commands

You can use the backup, schedule, and restore commands to automate Oracle Key Vault appliance backups.

10.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

--name / name

Required

Name of the backup destination. For a listing of existing names, run the okv backup destination list command.

--transfer-method / transferMethod

Optional

Enter one of the following values:

  • scp

    The default value is:

  • sftp

--host-name / hostName

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.

--port / port

Required

Port number of the destination backup computer. The default is 22.

--path / path

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.

--user-name / userName

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 scp connection. Do not include spaces, single quotation marks, or double quotation marks in a user name that is in a remote backup destination.

--authentication-method / authenticationMethod

Optional

Enter one of the following values:

  • password: The password of the user account specified in the --user-name / userNameparameter.

    The default Value is:

  • key-based: Use okv backup destination get-public-key to obtain the public key of the Oracle Key Vault internal user. Copy the public key from the command output and paste it in the appropriate configuration file, such as authorized_keys, on the destination server. Check that the permissions of the configuration file are set to allow access only to the backup account owner and 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.

--destination-policy / destinationPolicy

Optional

Specifies the name of the backup destination policy.

To find existing backup destination policies, run the okv backup destination-policy list command.

JSON Example

  1. 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"
        }
      }
    }
  2. 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"
        }
      }
    }
  3. 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"
    }

10.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

--name / name

Required

Name of the remote backup destination.

To find existing backup names, run the okv backup destination list command.

JSON Example

  1. 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"
        }
      }
    }
  2. 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"
        }
      }
    }
  3. 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"
    }

10.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

--destination / destination

Required

Specifies the name of the backup destination. Enter LOCAL.

The okv backup destination delete-backup command deletes an Oracle Key Vault backup by its backup file name. This is only supported for LOCAL destination.

--backup-file / backupFile

Required

Specifies the name of the backup file.

To find existing backup file names, run the okv backup destination list-backups command.

JSON Example

  1. 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"
          }
       }
    }
  2. 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"
          }
       }
    }
  3. 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"
    }

10.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

--name / name

Required

Name of the backup destinination. For a listing of existing names, run the okv backup destination list command.

JSON Example

  1. 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"
        }
      }
    }
  2. 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"
        }
      }
    }
  3. 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"
      }
    }

10.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

  1. 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"
      }
    }
  2. Save the generated input to a file (for example, bkup_srvr_dest_list.json).
  3. 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"
        }
      ]
    }

10.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

--name / name

Required

Name of the backup destination.

To find existing backup destination names, run the okv backup destination list command.

JSON Example

  1. 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"
        }
      }
    }
  2. 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"
        }
      }
    }
  3. 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"
        }
      ]
    }

10.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

--destination-policy / destinationPolicy

Required

Specifies the name of the backup destination policy to create.

To find existing backup destination policies, run the okv backup destination-policy list command.

--recent-backups-to-preserve / recentBackupsToPreserve

Optional

The number of the most recent backups to preserve. Enter a value from 1 through 999. For example, to preserve the most recent 15 backups, specify 15 for this value. The default setting is 10.

--purge-backup-after / purgeBackupAfter

Optional

Specifies the number of days after which a backup is eligible to be purged. Enter a value from 1 through 999. For example, a value of 45 will purge any backups older than 45 days. However, note that backups older than this number of days may be available because a backup is purged when it is older than the number of days specified in the --purge-backup-after / purgeBackupAfter parameter and there are more backups remaining than the number of backups specified in the --recent-backups-to-preserve / recentBackupsToPreserve parameter. The default setting is 30.

Enter this value using the ISO 8601 standard. For example, enter P25D to specify 25 days.

JSON Example

  1. 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"
          }
       }
    }
  2. 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"
          }
       }
    }
  3. 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"
    }

10.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

--destination-policy / destinationPolicy

Required

Specifies the name of the backup destination policy to delete.

To find existing backup destination policies, run the okv backup destination-policy list command.

JSON Example

  1. 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"
          }
       }
    }
  2. 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"
          }
       }
    }
  3. 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"
    }

10.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

--destination-policy / destinationPolicy

Required

Specifies the name of the backup destination policy to retrieve.

To find existing backup destination policies, run the okv backup destination-policy list command.

JSON Example

  1. 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"
          }
       }
    }
  2. 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"
          }
       }
    }
  3. 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"
      }
    }

10.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

  1. 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"
       }
    }
  2. Save the generated input to a file (for example, backup_dest_policy_list.json).
  3. 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"
      }
    }

10.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

--destination-policy / destinationPolicy

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 okv backup destination-policy list command.

--destination / destination

Optional

Name of the remote backup destination. To find existing backup destination names, run the okv backup destination list command. If you omit this setting, then it lists backups purged by a specified backup destination policy on all of the backup destinations.

JSON Example

  1. 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"
          }
       }
    }
  2. 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"
          }
       }
    }
  3. 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"
          }
        ]
      }
    }

10.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

--destination-policy / destinationPolicy

Required

Specifies the name of the backup destination policy to update.

To find existing backup destination policies, run the okv backup destination-policy list command.

--recent-backups-to-preserve / recentBackupsToPreserve

Optional

The number of the most recent backups to preserve. Enter a value from 1 through 999. For example, to preserve the most recent 15 backups, specify 15 for this value. The default setting is 10.

--purge-backup-after / purgeBackupAfter

Optional

Specifies the number of days after which a backup is eligible to be purged. Enter a value from 1 through 999. For example, a value of 45 will purge any backups older than 45 days. However, note that backups older than this number of days may be available because a backup is purged when it is older than the number of days specified in the --purge-backup-after / purgeBackupAfter parameter and there are more backups remaining than the number of backups specified in the --recent-backups-to-preserve / recentBackupsToPreserve parameter. The default setting is 30.

Enter this value using the ISO 8601 standard. For example, enter P25D to specify 25 days.

JSON Example

  1. 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"
          }
       }
    }
  2. 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"
          }
       }
    }
  3. 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"
    }

10.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

--destination / destination

Required

Specifies the name of the backup destination.

For a listing of existing destination names, run the okv backup destination list command.

JSON Example

  1. 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"
          }
       }
    }
  2. 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"
          }
       }
    }
  3. 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"
    }

10.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

--destination / destination

Required

Name of the backup destination.

For a listing of existing backup destination names, run the okv backup destination list command.

JSON Example

  1. 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"
          }
       }
    }
  2. 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"
          }
       }
    }
  3. 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"
    }

10.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

--name / name

Required

Name of the backup destination.

For a listing of existing backup destination names, run the okv backup destination list command.

--port / port

Optional

Port number of the destination backup computer. The default is 22.

--user-name / userName

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 scp connection. Do not include spaces, single quotation marks, or double quotation marks in a user name that is in a remote backup destination.

--authentication-method / authenticationMethod

Optional

Enter one of the following values:

  • password: The password of the user account specified in the --user-name / userNameparameter.

The default value is:

  • key-based: Use okv backup destination get-public-key to obtain the public key of the Oracle Key Vault internal user. Copy the public key from the command output and paste it in the appropriate configuration file, such as authorized_keys, on the destination server. Check that the permissions of the configuration file are set to allow access only to the backup account owner and 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.

--destination-policy / destinationPolicy

Optional

Specifies the backup destination policy.

To find existing backup destination policies, run the okv backup destination-policy list command.

Example

  1. 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"
        }
      }
    }
  2. 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"
        }
      }
    }
  3. 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 appears

    Destination User Password: password
    {
      "result" : "Success"
    }

10.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

  1. 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"
      }
    }
  2. Save the generated input to a file (for example, bkup_dest_get_public_key.json).
  3. 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"
      }
    }

10.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

--name / name

Required

Name of the backup destination.

To find existing backup destination names, run the okv backup destination list command.

JSON Example

  1. 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"
        }
      }
    }
  2. 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"
        }
      }
    }
  3. 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"
    }

10.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

--max / max

Required

The maximum number of the most recent complete backup information records that should be returned

JSON Example

  1. 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"
        }
      }
    }
  2. 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"
        }
      }
    }
  3. 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"
        }
      ]
    }

10.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

--name / name

Required

Name for the backup schedule job.

To find existing scheduled backups, run the okv backup schedule list command.

--start-time / startTime

Required

Time to begin the scheduled backup.

You can use different ways to set the date and time. Examples are as follows:

"startTime" : "now" --starts immediately
"startTime" : "now+PT10M" --starts 10 minutes from now
"startTime" : "2021-12-20 10:30:00" --starts at this date and time
"startTime" : "2021-12-20 10:30:00+PT10M" --starts 10 minutes after this date and time

To display the time in UTC format, use the Linux date command. For example:

$ date --utc "+%F %T"
2021-03-15 20:31:37

--destination / destination

Required

Type or name of backup destination. Enter one of the following values:

  • LOCAL
  • For a remote destination, enter its name. To find existing names, run the okv backup destination list command.

--type / type

Optional

Enter one of the following values:

  • PERIODIC

The default value is:

  • ONE-TIME

--interval / interval

Required for periodic backups

Enter the days, hours, and minutes in between the backups, using the following format:

days:hours:minutes

JSON Example

  1. 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"
          }
        }
      }
    }
  2. 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"
          }
        }
      }
    }
  3. 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"
    }

10.20 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 or remote-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

--name / name

Required

Name of the backup schedule job.

To find existing scheduled backups, run the okv backup schedule list command.

JSON Example

  1. 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"
        }
      }
    }
  2. 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"
        }
      }
    }
  3. 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"
      }
    }

10.21 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

  1. 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"
      }
    }
  2. Save the generated input to a file (for example, bkup_sched_list.json).
  3. 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"
        ]
      }
    }

10.22 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

--name / name

Required

Name of the backup schedule job.

To find existing scheduled backups, run the okv backup schedule list command. If you need more details about the backup that you want to pause, then run okv backup schedule get.

JSON Example

  1. 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"
        }
      }
    }
  2. 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"
        }
      }
    }
  3. 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"
    }

10.23 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

--name / name

Required

Name of the backup schedule job.

To find existing scheduled backups, run the okv backup schedule list command. If you need more details about the backup that you want to resume, then run okv backup schedule get.

JSON Example

  1. 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"
        }
      }
    }
  2. 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"
        }
      }
    }
  3. 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"
    }

10.24 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

--name / name

Required

Name of the backup schedule job.

To find existing scheduled backups, run the okv backup schedule list command. If you need more details about the backup that you want to delete, then run okv backup schedule get.

JSON Example

  1. 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"
        }
      }
    }
  2. 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"
        }
      }
    }
  3. 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"
    }

10.25 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

--name / name

Required

Name of the backup schedule job.

To find the names of existing scheduled backups, run the okv backup schedule list command. To find the details of the backup that you want to update, run okv backup schedule get.

--start-time / startTime

Optional

Time to begin the scheduled backup.

You can use different ways to set the date and time. Examples are as follows:

"startTime" : "now" --starts immediately
"startTime" : "now+PT10M" --starts 10 minutes from now
"startTime" : "2021-12-20 10:30:00" --starts at this date and time
"startTime" : "2021-12-20 10:30:00+PT10M" --starts 10 minutes after this date and time

To display the time in UTC format, use the Linux date command. For example:

$ date --utc "+%F %T"
2021-03-15 20:31:37

--interval / interval

Required for periodic backups

Enter the days, hours, and minutes in between the backups, using the following format:

days:hours:minutes

JSON Example

  1. 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"
          }
        }
      }
    }
  2. 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"
          }
        }
      }
    }
  3. 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"
    }

10.26 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

--name / name

Required

Name for the backup file.

To find existing scheduled backups, run the okv backup schedule list command.

--destination / destination

Required

Name of the backup destination.

For a listing of existing names, run the okv backup destination list command.

JSON Example

  1. 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"
        }
      }
    }
  2. 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, the passphrase 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"
        }
      }
    }
  3. 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"
    }

10.27 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

  1. 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"
      }
    }
  2. Save the generated input to a file (for example, bkup_restore_status.json).
  3. 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"
        }
    }