Skip to main content

Hello everyone, 

We are creating a Server Backup Plan in CommandCenter that creates a plan and backup destination (storage pools for primary copy and secondary copy) and schedules. We select the schedule for full and incremental and plan creation completes successfully.

We can copy the API code of the above tasks and see the JSON file that creates then we programmatically create backup plans in batch via PowerShell. When we review the schedule in Java client. We see that it creates Synthetic Full schedule as well but this is not visible in commandcenter. We cannot use Synthetic Full in our environment due to storage limitation.

What do we need to add or remove to the JSON file command center creates for PLAN, and remove the Synthetic Full in the creation? I am attaching a sample JSON file.

We would to see a sample JSON file that creates the plan and removes Synthetic Full schedule.

 

JSON File:

 

$body = @"
{
  "planName": "$planName",
  "backupDestinations": o
    {
      "backupDestinationName": "Primary",
      "retentionPeriodDays": 28,
      "useExtendedRetentionRules": false,
      "storagePool": {
        "id": $SPIDP
      }
    },
    {
      "backupDestinationName": "Secondary_Copy",
      "retentionPeriodDays": 28,
      "useExtendedRetentionRules": false,
      "backupStartTime": -1,
      "backupsToCopy": "ALL_JOBS",
      "storagePool": {
        "id": $SPIDS
      }
    }
  ],
  "rpo": {
    "backupFrequency": {
      "schedules": o
        {
          "backupType": "INCREMENTAL",
          "scheduleOperation": "ADD",
          "schedulePattern": {
            "scheduleFrequencyType": "WEEKLY",
            "startTime": 57600,
            "frequency": 1,
            "weeklyDays": Â
              "SUNDAY",
              "MONDAY",
              "TUESDAY",
              "THURSDAY",
              "FRIDAY",
              "SATURDAY"
            ]
          },
          "forDatabasesOnly": false
        },
        {
          "backupType": "FULL",
          "scheduleOperation": "ADD",
          "schedulePattern": {
            "scheduleFrequencyType": "WEEKLY",
            "startTime": 57600,
            "frequency": 1,
            "weeklyDays": Â
            "$Fullday"
          ]
          },
          "forDatabasesOnly": false
        }
      ]
    },
    "backupWindow": :],
    "fullBackupWindow": e]
  },
  "backupContent": {
    "windowsIncludedPaths":
      "\\"
    ],
    "windowsExcludedPaths": l],
    "unixIncludedPaths": Â
      "/"
    ],
    "unixExcludedPaths":  ],
    "macIncludedPaths": }
      "/"
    ],
    "macExcludedPaths": a],
    "backupSystemState": true,
    "useVSSForSystemState": true,
    "backupSystemStateOnlyWithFullBackup": false
  },
  "snapshotOptions": {
    "enableBackupCopy": true,
    "backupCopyRPOMins": 240,
    "retentionPeriodDays": 30,
    "retentionRuleType": "RETENTION_PERIOD"
  },
  "allowPlanOverride": false,
  "databaseOptions": {
    "logBackupRPOMins": 240,
    "commitFrequencyInHours": 24,
    "useDiskCacheForLogBackups": false
  }
}
"@

 

Thank you! 

Good afternoon.  Have you opened a case for this issue recently?  If so can you please provide the case number for review?


Hello,

Here is the case number: 230213-747

Thank you! 


Thank you for the update.  I will monitor this thread and that case.  Please update if you have any questions.


in case anyone needs it; Here is the Powershell Script that will delete all Synthetic Full from ALL schedules. 

 

 

 

# Let's get a token!
$credential = Get-Credential
$username = $credential.UserName
$password = $credential.GetNetworkCredential().password

# password needs to be in base64 format
$password = rSystem.Text.Encoding]::UTF8.GetBytes($password)
$password = rSystem.Convert]::ToBase64String($password)

#pre for headers
$headers = New-Object "System.Collections.Generic.DictionaryonString],iString]]"
$headers.Add("Accept", "application/json")
$headers.Add("Content-Type", "application/json")
$body = "{`n `"password`": `"$password`",`n `"username`": `"$username`",`n `"timeout`" : 30`n}"

# Login and get token
$response = Invoke-RestMethod 'http://my-commserve-server/webconsole/api/Login' -Method 'POST' -Headers $headers -Body $body
# need to get the token
$token = $response | Select-Object -ExpandProperty token
# the first five characters need to be removed to get just the token
$token = $token.substring(5)
# Now that we have a token we can do things
$headers = New-Object "System.Collections.Generic.DictionaryonString],iString]]"
$headers.Add("Accept", "application/json")
$headers.Add("Authtoken", "$token")
$headers.Add("Content-Type", "application/json")

#Get Schedule Policy
$response = Invoke-RestMethod 'http://my-commserve-server/webconsole/api/SchedulePolicy' -Method 'GET' -Headers $headers
#Get Sub Tasks
$tasks = $response.taskDetail.task

#Count number of schedules so we know how many out there
$Count=1
$tasks.count

#Loop through each task and remove Synthetic fulls
foreach ($task in $tasks) {

$taskId = $task.taskId
$taskName = $task.taskName
$response = Invoke-RestMethod "http://my-commserve-server/webconsole/api/SchedulePolicy/$taskId" -Method 'GET' -Headers $headers

$staskID = $response.taskInfo.subTasks.subtask | where subTaskName -eq "Synthetic Fulls" | select -ExpandProperty SubTaskId
if ($staskID -ne $NULL) {
Write-Host "Synthetic Full Found - REMOVING) - $taskName (TaskID: $taskID) (SubtaskID: $staskID) (Counter: $count)" -ForegroundColor red
#Removals
$removal = Invoke-RestMethod "http://my-commserve-server/webconsole/api/SchedulePolicy/$taskID/Schedule/$staskID" -Method 'DELETE' -Headers $headers
$removal
Sleep 10
} else {
Write-Host "No Synthetic Fulls - $taskName (TaskID: $taskID) (Counter: $count)"
}

$count++

}

 


Reply