Use the createDiskSafeWithObject API to create a new Disk Safe.
########====CDP Server Configuration Start====########
#set CDP server host name
$HOST="10.230.131.25";
#set CDP server to access API
$PORT="9443";
#set CDP user
$USER="admin";
#set CDP user password
$PASS="admin";
########====CDP Server Configuration End====########
$disksafe->description = "DSAPI";
$disksafe->path = "/root/DSAPI";
$disksafe->compressionType = "ZLIB";
$disksafe->compressionLevel = "MEDIUM";
$disksafe->deviceBackupType = "AUTO_ADD_DEVICES";
$disksafe->backupPartitionTable = "True";
$disksafe->backupUnmountedDevices = "True";
$disksafe->agentID = $AGENTID;
$disksafe->diskSafeAttributeMap = array(
array( "key" => "FILE_EXCLUDES_ENABLED", "value" => "true"),
array( "key" => "ARCHIVING_ENABLED", "value" => "true"),
array( "key" => "CONTROLPANELS_ENABLED", "value" => "true"),
array( "key" => "REPLICATION_FREQUENCY_LIMIT", "value" => "NO_LIMIT"),
array( "key" => "RECOVERY_POINT_LIMIT", "value" => "7"),
array( "key" => "ARCHIVE_POINT_LIMIT", "value" => "7"),
array( "key" => "QUOTA_TYPE", "value" => "ON_DISK_SIZE"),
array( "key" => "SOFT_QUOTA_VALUE", "value" => "2"),
array( "key" => "HARD_QUOTA_VALUE", "value" => "5")
);
$disksafe->deDuplication = "true";
#Create a new disk safe.
try{
$client = new soapclient("https://$HOST:$PORT/DiskSafe?wsdl", array('login'=>"$USER", 'password'=>"$PASS", 'trace'=>1));
$response = $client->createDiskSafeWithObject(array('disksafe'=>$disksafe));
var_dump($response);
echo "Successfully executed createDiskSafeWithObject\n";
exit(0);
}
catch (SoapFault $exception)
{
echo $exception;
exit(1);
}
Labels:
None