Skip to content

Commit

Permalink
fix large backups
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDuprey committed Jan 7, 2025
1 parent 5ec4ad6 commit fd89089
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Function Invoke-ExecListBackup {
}

$Result = Get-CIPPBackup @CippBackupParams
Write-Host ($Result | ConvertTo-Json)
if ($request.Query.NameOnly) {
$Result = $Result | Select-Object @{Name = 'BackupName'; exp = { $_.RowKey } }, Timestamp | Sort-Object Timestamp -Descending
}
Expand Down
1 change: 1 addition & 0 deletions Modules/CIPPCore/Public/Get-CIPPAzDatatableEntity.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function Get-CIPPAzDataTableEntity {
}
$fullEntity | Add-Member -MemberType NoteProperty -Name 'PartitionKey' -Value $parts[0].PartitionKey -Force
$fullEntity | Add-Member -MemberType NoteProperty -Name 'RowKey' -Value $entityId -Force
$fullEntity | Add-Member -MemberType NoteProperty -Name 'Timestamp' -Value $parts[0].Timestamp -Force
$finalResults = $finalResults + @($fullEntity)
} else {
$finalResults = $finalResults + @($entityData.Entity)
Expand Down
4 changes: 2 additions & 2 deletions Modules/CIPPCore/Public/Get-CIPPBackup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ function Get-CIPPBackup {
$Conditions.Add("TenantFilter eq '$($TenantFilter)'")
}
if ($Name) {
$Conditions.Add("RowKey eq '$($Name)'")
$Conditions.Add("RowKey eq '$($Name)' or OriginalEntityId eq '$($Name)'")
}

if ($NameOnly.IsPresent) {
$Table.Property = @('PartitionKey', 'RowKey', 'Timestamp')
$Table.Property = @('PartitionKey', 'RowKey', 'Timestamp', 'OriginalEntityId')
}

$Filter = $Conditions -join ' and '
Expand Down

0 comments on commit fd89089

Please sign in to comment.