7 Backup, Schedule, and Restore Commands

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

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

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"
    }
  }
}

Parameters

Parameter/Template Parameter Required? Description

--name / name

Required

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

--transfer-method / transferMethod

Required

Enter one of the following values:

  • scp
  • 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

Required

Enter one of the following values:

  • password: The password of the user account specified in the --user-name / userNameparameter.
  • 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.

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"
        }
      }
    }
  2. Save the generated input to a file (for example, bkup-srvr-dest-create.json) and then edit it so that you can create the backup server destination.
    {
      "service" : {
        "category" : "backup",
        "resource" : "destination",
        "action" : "create",
        "options" : {
          "name" : "hr_backup",
          "transferMethod" : "scp",
          "hostName" : "192.0.2.34",
          "port" : "22",
          "path" : "/opt/okv/bckups",
          "userName" : "psmith",
          "authenticationMethod" : "password"
        }
      }
    }
  3. Execute 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"
    }

7.2 okv backup destination delete Command

The okv backup destination delete command deletes a 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, execute 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 so that you can delete the backup server destination.
    {
      "service" : {
        "category" : "backup",
        "resource" : "destination",
        "action" : "delete",
        "options" : {
          "name" : "prod_okv_backup_dest"
        }
      }
    }
  3. Execute 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"
    }

7.3 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, execute 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 so that you can get the backup server destination.
    {
      "service" : {
        "category" : "backup",
        "resource" : "destination",
        "action" : "get",
        "options" : {
          "name" : "PROD_OKV_BACKUP_DEST"
        }
      }
    }
  3. Execute 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" : "Key-based",
        "hostName" : "192.0.2.1",
        "name" : "PROD_OKV_BACKUP_DEST",
        "path" : "/net/okv_backup_dest",
        "transferMethod" : "scp",
        "userName" : "psmith"
      }
    }

7.4 okv backup destination list Command

The okv backup destination list command displays a list of the names 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.json).
  3. Execute the okv backup destination list command using the generated JSON file.
    okv backup destination list --from-json bkup-srvr-dest.json

    Output similar to the following appears:

    {
      "result" : "Success",
      "destinations" : [
        {
          "authenticationMethod" : " ",
          "path" : "-",
          "hostName" : "localhost",
          "name" : "LOCAL",
          "transferMethod" : "-",
          "userName" : "-"
        },
        {
          "authenticationMethod" : "Password",
          "path" : "/net/okv_backup_dest",
          "hostName" : "192.0.2.169",
          "name" : "PROD_OKV_BACKUP_DEST",
          "port" : "22",
          "transferMethod" : "scp",
          "userName" : "psmith"
        }
      ]
    }

7.5 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, execute 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 so that you can list the backup server destinations.
    {
      "service" : {
        "category" : "backup",
        "resource" : "destination",
        "action" : "list-backups",
        "options" : {
          "name" : "prod_okv_backup_dest"
        }
      }
    }
  3. Execute 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_onetime_onetime_20210118175804",
          "time" : "2021-03-31 18:36:00",
          "type" : "One-Time"
        }
      ]
    }

7.6 okv backup destination update Command

The okv backup destination update command updates saved backup destination settings.

Required Authorization

System Administrator role

Syntax

okv backup destination update 
--name destination_name 
--port port 
--user-name user_name 
--authentication-method authentication_method

JSON Input File Template

{
  "service" : {
    "category" : "backup",
    "resource" : "destination",
    "action" : "update",
    "options" : {
      "name" : "#VALUE",
      "port" : "#VALUE",
      "userName" : "#VALUE",
      "authenticationMethod" : "#password|key-based"
    }
  }
}

Parameters

Parameter/Template Parameter Required? Description

--name / name

Required

Name of the backup destination. For a listing of existing backup destination names, execute 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.
  • 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.

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"
        }
      }
    }
  2. Save the generated input to a file (for example, update-bkup-srvr-dest.json) and then edit it so that you can update the backup server destination.
    {
      "service" : {
        "category" : "backup",
        "resource" : "destination",
        "action" : "update",
        "options" : {
          "name" : "hr_backup",
          "port" : "22",
          "userName" : "psmith",
          "authenticationMethod" : "password"
        }
      }
    }
  3. Execute 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"
    }

7.7 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. Execute 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"
      }
    }

7.8 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, execute 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 so that you can reset the host key for the destination server.
    {
      "service" : {
        "category" : "backup",
        "resource" : "destination",
        "action" : "reset-host-key",
        "options" : {
          "name" : "hr_backup"
        }
      }
    }
  3. Execute 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"
    }

7.9 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 so that you can generate a backup history list.
    {
      "service" : {
        "category" : "backup",
        "resource" : "history",
        "action" : "list",
        "options" : {
          "max" : "10"
        }
      }
    }
  3. Execute 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"
        }
      ]
    }

7.10 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_in_UTC" 
--destination LOCAL|VALUE 
--type ONE-TIME|PERIODIC 
--interval timing

JSON Input File Template

{
  "service" : {
    "category" : "backup",
    "resource" : "schedule",
    "action" : "create",
    "options" : {
      "name" : "#VALUE",
      "startTime" : "#NOW|YYYY-MM-DD HH:mm:ss",
      "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, execute the okv backup schedule list command.

--start-time / startTime

Required

Time to begin the scheduled backup, in double quotation marks. Enter one of the following values, in UTC:

  • NOW
  • A specific time, using the following format: YYYY-MM-DD HH:mm:ss

--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, execute the okv backup destination list command.

--type / type

Required

Enter one of the following values:

  • ONE-TIME
  • PERIODIC

--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" : "#NOW|YYYY-MM-DD HH:mm:ss",
          "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 so that you can create a 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. Execute 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"
    }

7.11 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, execute the okv backup schedule list command. If you need more details about the backup that you want to delete, then execute 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 so that you can delete the backup schedule.
    {
      "service" : {
        "category" : "backup",
        "resource" : "schedule",
        "action" : "delete",
        "options" : {
          "name" : "okv_backup_hourly"
        }
      }
    }
  3. Execute 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"
    }

7.12 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, execute 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 so that you can get the backup schedule.
    {
      "service" : {
        "category" : "backup",
        "resource" : "schedule",
        "action" : "get",
        "options" : {
          "name" : "okv_backup_hourly"
        }
      }
    }
  3. Execute 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"
      }
    }

7.13 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. Execute the okv backup schedule list command using the generated JSON file.
    okv backup schedule list --from-json bkup-sched-list.json

    Output similar to the following appears:

    {
      "result" : "Success",
      "value" : {
        "schedules" : [
          "OKV_BACKUP_HOURLY",
          "LOCAL_BACKUP"
        ]
      }
    }

7.14 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, execute the okv backup schedule list command. If you need more details about the backup that you want to pause, then execute 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. Execute 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"
    }

7.15 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, execute the okv backup schedule list command. If you need more details about the backup that you want to resume, then execute 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 so that you can resume a paused backup schedule.
    {
      "service" : {
        "category" : "backup",
        "resource" : "schedule",
        "action" : "resume",
        "options" : {
          "name" : "okv_backup_hourly"
        }
      }
    }
  3. Execute 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"
    }

7.16 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_in_UTC" ] 
[--interval timing]

JSON Input File Template

{
  "service" : {
    "category" : "backup",
    "resource" : "schedule",
    "action" : "update",
    "options" : {
      "name" : "#VALUE",
      "startTime" : "#NOW|YYYY-MM-DD HH:mm:ss",
      "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, execute the okv backup schedule list command. To find the details of the backup that you want to update, execute okv backup schedule get.

--start-time / startTime

Optional

Time to begin the scheduled backup, in double quotation marks. Enter one of the following values, in UTC:

  • NOW
  • A specific time, using the following format: YYYY-MM-DD HH:mm:ss

--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" : "NOW|#YYYY-MM-DD HH:mm:ss",
          "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 so that you can update the backup schedule.
    {
      "service" : {
        "category" : "backup",
        "resource" : "schedule",
        "action" : "update",
        "options" : {
          "name" : "hr_backup",
          "startTime" : "2020-12-20 18:00:00",
          "interval" : {
            "days" : "0",
            "hours" : "12",
            "mins" : "0"
          }
        }
      }
    }
  3. Execute 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"
    }

7.17 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 executing the okv backup restore status command.

Syntax

okv backup restore start --name destination_name --destination backup_schedule_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 schedule job. To find existing scheduled backups, execute the okv backup schedule list command.

--destination / destination

Required

Name of the backup destination job. For a listing of existing names, execute the okv backup destination list command. If you need more details about the backup that you want to restore, then execute okv backup schedule get.

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 so that you can start the restore of a backup schedule. 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" : "okv_backup_hourly",
          "destination" : "prod_okv_backup_dest"
        }
      }
    }
  3. Execute 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"
    }

7.18 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. Execute 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"
        }
    }