View Source

h4. Deleting a Backup Task

To delete a Backup Task, you can use the following Policy API calls:
* {{deletePolicy}}
* {{deletePolicyById}}

Follow the instructions below to delete a Backup Task using API samples.
{info:title=Note}The following instructions are valid for the Linux CentOS operating system.
{info}
1. Log in by shell or remote shell (Local or SSH) to the machine where the CDP API samples are located.
{note:title=Notice}
* Make sure the API server is enabled on a known port on the target CDP Server.
* Make sure you have Super-User credentials for the target CDP Server.
* Make sure one or more policies have been created already.
{note}
2. Launch the console and run the following command:

{code}yum install php-cli php-soap{code}

This will install the packages needed for working with {color:blue}.php{color} files.
!backup1.png!

3. Change the working directory to:

{code}/usr/sbin/r1soft/apisamples/Policy{code}

If you use the _ls_ command, you will see a list of all available api samples.
!backup2.png!

4. To delete a specific Policy, execute the "deletePolicy.php" sample. You will need to provide the following parameters:
* hostname/IP
* (API) port
* user
* password
* Policy ID.
!backup3.png!

To find the Policy IDs, use the "getPolicyIDs.php" sample.
!backup4.png!

5. The Policy will be deleted.

h4. Displaying Information about Backup Task Scheduling

The Policy commands below provide details about Backup Task scheduling:
* {{getPolicyIDs}}
* {{getPolicies}}
* {{getPolicyById}}

1. Log in by shell or remote shell (Local or SSH) to the machine where the CDP API samples are located.
{note:title=Notice}
* Make sure the API server is enabled on a known port on the target CDP Server.
* Make sure you have Super-User credentials for the target CDP Server.
* Make sure one or more policies have been created already.
{note}
2. Launch the console.
{info:title=Notice}You should already have _php-cli_ and _php-soap_ packages installed.
{info}
3. Change the working directory to:

{code}/usr/sbin/r1soft/apisamples/Policy{code}

If you use the _ls_ command, you will see a list of all available api samples.
!backup2.png!

4. Execute any of the following samples to retrieve information about existing Policies, providing appropriate values for accessing the CDP server:
* hostname/IP
* (API) port
* user
* password
* Policy ID (where required).

The results are shown below:

!backup5.png!

!backup6.png!

!backup7.png!

h6. Parameters:

* *scheduledTaskID* \- The ID of the Scheduled Task to edit.
* *enabled* \- Whether the Task should be enabled when created.
* *description* \- The description for the Scheduled Task.
* *recoveryPointsToKeep* \- The number of Recovery Points to keep ("Retention Policy").
* *runVerifyTask* \- Whether to launch a Verify Task when the Backup finishes.
* *runDefragmentTask* \- Whether to launch a Defragment Task when Backup finishes.
* *backupAllActiveDevices* \- Whether to Backup all active devices.
{info:title=Note} If true, diskDevicePaths and partitionDevicePaths are ignored.
{info}
* *diskDevicePaths* \- An array of strings specifying the device paths of the Disks to be backed up.
* *partitionDevicePaths* \- An array of strings specifying the device paths of the partitions to be backed up.
* *frequency* \- The frequency (MINUTELY, HOURLY, DAILY, WEEKLY, MONTHLY, NO_RECURRENCE) for the schedule.
{info:title=Note} MINUTELY = 1, HOURLY = 2, DAILY = 3, WEEKLY = 4, MONTHLY = 5, NO_RECURRENCE = 7
{info}{excerpt:hidden=true}Instructions on how to delete a Backup Task and how to display information about a Backup Task.{excerpt}