π Research Study These findings are the result of independent research conducted out of curiosity to better understand how ShareGate works and stores data. This documentation aims to help SharePoint migration specialists understand ShareGate's data architecture.
π¬ Research Findings and Best Practices ShareGate does NOT use a traditional database - all data is stored as serialized .NET objects Data files are NOT portable between ShareGate instances - tied to specific machine/user Large migration histories (>10GB) cause severe performance issues - ShareGate UI becomes slow, exports take a long time Performance issues stem from lack of proper relational database - serialized .NET objects were convenient for ShareGate's developers but cause performance problems for migration consultants working at scale ShareGate cannot easily upgrade to use databases as it would break compatibility with existing data files Cleanup is recommended ONLY when performance degrades - export your data first, then delete old tasks via ShareGate UI Always backup before deleting any .sdb files ShareGate stores its data in several key locations on your local machine. Understanding these locations is crucial for managing migration data effectively.
π Migration History %LOCALAPPDATA%\Sharegate\userdata\migration\Contains:
RecentSessionsInformation.sdb PrincipalMappings.sdb CustomFields.sdb NintexApiKey.sdb Contains session history and user mappings
π Application Logs (Tasks) %LOCALAPPDATA%\Sharegate\userdata\applogs\Contains:
10000001.sdb (Session 1) 10000002.sdb (Session 2) ... (can be GB+ each) π‘ These appear as "Tasks" in ShareGate UI
πΎ Cache %LOCALAPPDATA%\Sharegate\userdata\cache\β
Safe to delete
Temporary files
π
Scheduled Jobs %LOCALAPPDATA%\Sharegate\userdata\scheduling\Scheduled migration definitions
βοΈ ShareGate Config Files %LOCALAPPDATA%\Sharegate\userdata\settings\JSON Configuration Files:
application-settings.json connection-settings.json user-preferences.json recent-connections.json bash π Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
%LOCALAPPDATA% \ Sharegate \ userdata \
β
βββ π migration \
β βββ RecentSessionsInformation.sdb ( 100 KB - 1 MB )
β βββ PrincipalMappings.sdb ( 10 - 100 KB )
β βββ CustomFields.sdb ( 1 - 10 KB )
β βββ NintexApiKey.sdb ( 1 - 10 KB )
β βββ _Schema.sdb ( Schema definitions )
β
βββ π applogs \ β οΈ LARGEST FILES = "Tasks" in UI
β βββ 10000001 .sdb ( 1 MB - 10 + GB per file ! )
β βββ 10000002 .sdb ( Each is a migration task/session )
β βββ 10000003 .sdb ( Contains ALL item details )
β βββ .. . ( Numbers increment per session )
β
βββ π cache \ β
SAFE TO DELETE
β βββ [ Various temporary .sdb files ]
β
βββ π scheduling \
β βββ [ Scheduled job definitions ]
β
βββ π tables \
βββ Reports.sdb ( Report configurations )
ShareGate provides powerful PowerShell cmdlets for managing and exporting migration data. Here are the most important commands:
powershell π Copy
$shareGateData = " $env :LOCALAPPDATA\Sharegate\userdata"
Get-ChildItem - Path $shareGateData - Filter "*.sdb" - Recurse |
Select-Object FullName , @ { N= 'Size(MB)' ; E= { [Math] ::Round ( $_ . Length/1MB , 2 ) } } , LastWriteTime |
Sort-Object 'Size(MB)' - Descending
powershell π Copy
Import-Module Sharegate
$sessions = Find-CopySessions
Write-Host " $ ( $sessions . Count ) sessions found" - ForegroundColor Green
mkdir "ShareGate Migration Logs" - ErrorAction SilentlyContinue
Push-Location "ShareGate Migration Logs"
for ( $o =0 ; $o -lt $sessions . count ; $o ++ ) {
$session = $sessions [ $o ]
Export-Report $session - NoItemVersions - DefaultColumns - Path ".\ $ ( $session . Id ) .csv"
}
Pop-Location
powershell π Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$appLogsPath = " $env :LOCALAPPDATA\Sharegate\userdata\applogs"
$totalGB = ( Get-ChildItem $appLogsPath - Filter "*.sdb" |
Measure-Object Length - Sum ) . Sum / 1GB
if ( $totalGB -gt 10 ) {
Write-Host "WARNING: Applogs size is $ ( [Math] ::Round ( $totalGB , 2 ) ) GB" - ForegroundColor Red
Write-Host "Export your sessions with Export-Report, then delete old logs" - ForegroundColor Yellow
Get-ChildItem $appLogsPath - Filter "*.sdb" |
Where-Object { $_ . Length -gt 1GB } |
Sort-Object LastWriteTime |
Select-Object - First 10 |
Remove-Item - Force - WhatIf
}
When you click on a task in ShareGateβs Task History, the application needs to load and deserialize the entire .sdb file for that session. Larger files take significantly longer to load:
< 1 GB: Fast Task Loading
1-5 GB: Acceptable Loading Time
5-10 GB: Slow - Tasks Take Long to Open
> 10 GB: Very Slow - May Freeze UI
Best Practices: Export data when performance degrades Keep total size under 10 GB Archive first, then delete Use performance-based cleanup approach The applogs files (10000xxx.sdb) appear as βTasksβ in the ShareGate desktop application. Each task represents a migration session with detailed results:
ShareGate Tasks UI showing migration history
The ShareGate Tasks interface showing migration sessions - each entry corresponds to a .sdb file in the applogs folder
Tasks = Logs
UI Name for Applogs
10000xxx.sdb
Actual File Format
Success/Error
Result Tracking
Export Available
Via PowerShell
ShareGate follows a specific data flow pattern for storing and retrieving migration data:
User β ShareGate UI β SnapDb Engine β Applogs Files (.sdb)
β β
Migration Complete PowerShell Export
β
CSV/XLSX Report
ShareGate Desktop β Performs MigrationSnapDb Engine β Serializes Objects.sdb Files β Binary StoragePowerShell β Export Reportsβ οΈ For Reference Only These DLLs are heavily obfuscated with single-letter class names (a, b, c) and cannot be used directly. This information is for research purposes only.
Primary DLL Location: %LOCALAPPDATA%\Apps\ShareGate\Data Storage Location: %LOCALAPPDATA%\Sharegate\userdata\Note: There are TWO distinct locations - Apps\ShareGate\ for executables and Sharegate\userdata\ for data.
ShareGate's DLLs
While it is not possible to reuse ShareGateβs DLLs directly due to heavy obfuscation, Iβm documenting them here for scientific and educational purposes. Understanding the architecture helps migration specialists troubleshoot issues and optimize their workflows.
Core DLLs Sharegate.Automation.dll - PowerShell cmdlets (obfuscated)Sharegate.Common.dll - Common utilities (heavily obfuscated)Sharegate.Protobuf.Shared.dll - Custom serialization (proprietary)ShareGate.Tasks.Copy.Service.dll - Copy operations logicDatabase & Storage DLLs SnapDb.dll - NoSQL database engineprotobuf-net.dll - Protocol Buffers serializationSharegate.Logging.dll - Logging infrastructureShareGate stores various configuration settings in JSON format. These files control different aspects of the application:
π application-settings.json - Main application configurationUI theme preferences (light/dark mode) Window size and position Performance settings (concurrent operations) Auto-update preferences Telemetry settings json π Copy
{
"theme" : "light" ,
"maxConcurrentOperations" : 4 ,
"autoUpdate" : true ,
"telemetryEnabled" : true ,
"windowState" : {
"width" : 1200 ,
"height" : 800 ,
"maximized" : false
}
}
π connection-settings.json - Connection and authenticationSaved SharePoint site connections Authentication method preferences Proxy server configuration Timeout settings SSL/TLS preferences json π Copy
{
"defaultAuthMethod" : "Modern" ,
"connectionTimeout" : 30000 ,
"useProxy" : false ,
"validateCertificates" : true ,
"retryAttempts" : 3 ,
"sslProtocol" : "Tls12"
}
π user-preferences.json - User-specific migration defaultsDefault copy options Preferred migration settings Notification preferences Export format defaults Error handling preferences json π Copy
{
"defaultCopyOptions" : {
"preservePermissions" : true ,
"preserveMetadata" : true ,
"versionLimit" : 10 ,
"includeVersions" : false ,
"preserveAuthors" : true
} ,
"exportFormat" : "xlsx" ,
"notificationSound" : true
}
π recent-connections.json - Quick access historyRecently accessed SharePoint sites Teams and M365 Groups connections Last access timestamps Connection metadata Quick connect favorites json π Copy
{
"recentSites" : [
{
"url" : "https://[tenant].sharepoint.com" ,
"title" : "Contoso Portal" ,
"lastAccessed" : "2024-01-15T10:30:00Z" ,
"isFavorite" : true ,
"authType" : "Modern"
}
] ,
"maxRecentItems" : 20
}
β οΈ Privacy Note: These JSON files may contain sensitive information like tenant URLs, license keys, and user mappings. Handle with care when sharing or backing up.
Purpose: Quickly assess the health of your ShareGate installation by checking total data size and identifying old log files that may impact performance.
powershell π Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function Test-ShareGateHealth {
$data = " $env :LOCALAPPDATA\Sharegate\userdata"
$totalGB = ( Get-ChildItem $data - Recurse |
Measure-Object Length - Sum ) . Sum / 1GB
$oldLogs = Get-ChildItem " $data \applogs" - Filter "*.sdb" |
Where-Object { $_ . LastWriteTime -lt ( Get-Date ) . AddDays ( - 90 ) }
Write-Host "`n=== ShareGate Health Status ===" - ForegroundColor Cyan
if ( $totalGB -lt 5 ) {
Write-Host "β Size OK: $ ( [Math] ::Round ( $totalGB , 1 ) ) GB" - ForegroundColor Green
} elseif ( $totalGB -lt 10 ) {
Write-Host "β Size Warning: $ ( [Math] ::Round ( $totalGB , 1 ) ) GB" - ForegroundColor Yellow
} else {
Write-Host "β Size Critical: $ ( [Math] ::Round ( $totalGB , 1 ) ) GB" - ForegroundColor Red
}
if ( $oldLogs . Count -gt 0 ) {
Write-Host "β Found $ ( $oldLogs . Count ) logs older than 90 days" - ForegroundColor Yellow
} else {
Write-Host "β No old logs found" - ForegroundColor Green
}
}
Test-ShareGateHealth
Purpose: Create a backup of critical ShareGate data (migration history, scheduled jobs, and reports) while excluding temporary cache files.
powershell π Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$timestamp = Get-Date - Format "yyyyMMdd-HHmmss"
$backupPath = " $env :USERPROFILE\Desktop\ShareGate-Backup- $timestamp "
New-Item - ItemType Directory - Path $backupPath - Force
$source = " $env :LOCALAPPDATA\Sharegate\userdata"
$folders = @ ( 'migration' , 'scheduling' , 'tables' )
foreach ( $folder in $folders ) {
Copy-Item - Path " $source \ $folder " - Destination $backupPath - Recurse
Write-Host "β Backed up: $folder " - ForegroundColor Green
}
Write-Host "`nβ Backup complete: $backupPath " - ForegroundColor Green
Purpose: Clean up cache and archive old applogs when ShareGate performance degrades. Only run this when you experience slow task loading times.
powershell π Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$shareGateData = " $env :LOCALAPPDATA\Sharegate\userdata"
Remove-Item " $shareGateData \cache\*" - Recurse - Force - ErrorAction SilentlyContinue
Write-Host "β Cache cleared" - ForegroundColor Green
$archivePath = " $env :USERPROFILE\Desktop\ShareGate-Archive- $ ( Get-Date - Format 'yyyyMM' ) "
New-Item - ItemType Directory - Path $archivePath - Force
$oldLogs = Get-ChildItem " $shareGateData \applogs" - Filter "*.sdb" |
Where-Object { $_ . LastWriteTime -lt ( Get-Date ) . AddDays ( - 90 ) }
if ( $oldLogs ) {
$oldLogs | Move-Item - Destination $archivePath
Write-Host "β Archived $ ( $oldLogs . Count ) old log files" - ForegroundColor Green
}
$newSize = ( Get-ChildItem $shareGateData - Recurse |
Measure-Object Length - Sum ) . Sum / 1GB
Write-Host "β Current size: $ ( [Math] ::Round ( $newSize , 2 ) ) GB" - ForegroundColor Green
π¦ Binary key-value store π³ B+Tree indexing π Custom serialization β οΈ No SQL support .SDB files are ShareGateβs proprietary storage format for Task History:
What they are: Binary files containing serialized .NET objectsWhere created: In %LOCALAPPDATA%\Sharegate\userdata\applogs\ as numbered files (10000001.sdb, 10000002.sdb, etc.)When created: Each migration session creates a new .sdb fileWhat they contain: Complete details of every item migrated, including success/failure status, metadata, and error messagesHow to inspect: Via ShareGate UI: Click on any task in the Task History Via PowerShell: Use Find-CopySessions and Export-Report cmdlets Why they get large: Each file contains ALL item details from that migration session - a migration of 100,000 items creates a massive .sdb fileπ Reporting Cmdlets π Copy Cmdlets (Generate Logs) π Full PowerShell Documentation β
This research provides a comprehensive understanding of ShareGateβs data storage architecture. The key findings reveal that ShareGate uses a custom NoSQL database (SnapDb) with serialized .NET objects rather than a traditional relational database. This architectural choice, while convenient for development, can lead to performance issues at scale.
Monitor your applogs folder size - Keep it under 10GB for optimal performanceExport data regularly - Use PowerShell cmdlets to export migration historyClean up periodically - But only when performance degradesBackup before cleanup - Always preserve your migration dataUnderstand the architecture - Knowledge helps in troubleshooting and optimizationFor SharePoint Migration Specialists seeking to understand ShareGateβs inner workings.