Skip to content

Backup too slow, takes nearly 3 hours to write a ~ 53Mb backup dump file compressed #110

Description

@sunshine69

Hi Team,

I am not sure whether it is what it is or something I can optimize. My backup scripts now takes around 3 hours for that size of dump. The compression in the subject mentioned is zstd with level 3.

The backup script is simple - it is a ansibel template and will be rendered before run

Import-Module EntraExporter
Import-Module Microsoft.Graph.Authentication

# Define the Application (Client) ID and Secret
$ApplicationClientId = '{{ ApplicationClientId }}' # Application (Client) ID
$ApplicationClientSecret = '{{ ApplicationClientSecret }}' # Application Secret Value
$TenantId = '{{ TenantId }}' # Tenant ID

# Convert the Client Secret to a Secure String
$SecureClientSecret = ConvertTo-SecureString -String $ApplicationClientSecret -AsPlainText -Force

# Create a PSCredential Object Using the Client ID and Secure Client Secret
$ClientSecretCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $ApplicationClientId, $SecureClientSecret
# Connect to Microsoft Graph Using the Tenant ID and Client Secret Credential
Connect-MgGraph -TenantId $TenantId -ClientSecretCredential $ClientSecretCredential -NoWelcome
# $TenantPath points to the local directory where we save our backup
$TenantPath = '{{ TenantPath }}'
Export-Entra $TenantPath -All -CloudUsersAndGroupsOnly

Please help if anything that can be optimized or I am doing something completely idiot. Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions