HomeAboutAll Posts

ShareGate Data Storage Architecture - Interactive Research Study

By Denis Molodtsov
Published in SharePoint
January 04, 2025
3 min read
ShareGate Data Storage Architecture - Interactive Research Study

Table Of Contents

01
πŸš€ Understanding Where and How ShareGate Stores Migration Data
02
πŸ“ Data Storage Locations
03
πŸ”§ PowerShell Commands
04
πŸ“Š Performance Impact Analysis
05
πŸ“Έ ShareGate Tasks Interface
06
πŸ”„ Data Flow Architecture
07
πŸ’Ύ DLL Reference and Technical Details
08
βš™οΈ ShareGate Configuration Files
09
πŸ› οΈ Maintenance Scripts
10
⚑ Additional Technical Details
11
Conclusion

πŸš€ Understanding Where and How ShareGate Stores Migration Data

πŸ“š 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.
  • πŸ” ShareGate Login
  • πŸ“š Documentation
  • ⚑ PowerShell Reference
  • 🌐 ShareGate Website
πŸ”¬ 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

πŸ“ Data Storage Locations

ShareGate stores its data in several key locations on your local machine. Understanding these locations is crucial for managing migration data effectively.

Primary Storage Paths

πŸ“Š 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

File Structure Overview

bash
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)

πŸ”§ PowerShell Commands

ShareGate provides powerful PowerShell cmdlets for managing and exporting migration data. Here are the most important commands:

Find ShareGate Data

powershell
1
2
3
4
5
6
7
# Get ShareGate data location
$shareGateData = "$env:LOCALAPPDATA\Sharegate\userdata"
# List all .sdb files with sizes
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

Export All Migration Sessions

powershell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Export each migration session to individual CSV files
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]
# Both .CSV and .XLSX are supported:
Export-Report $session -NoItemVersions -DefaultColumns -Path ".\$($session.Id).csv"
}
Pop-Location
powershell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Export logs when performance degrades, then delete old logs
# Check total size first
$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
# After exporting, delete large old files
Get-ChildItem $appLogsPath -Filter "*.sdb" |
Where-Object { $_.Length -gt 1GB } |
Sort-Object LastWriteTime |
Select-Object -First 10 |
Remove-Item -Force -WhatIf # Remove -WhatIf to actually delete
}

πŸ“Š Performance Impact Analysis

Task Loading Performance in ShareGate UI

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

πŸ“Έ ShareGate Tasks Interface

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
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

πŸ”„ Data Flow Architecture

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

Process Flow

  1. ShareGate Desktop β†’ Performs Migration
  2. SnapDb Engine β†’ Serializes Objects
  3. .sdb Files β†’ Binary Storage
  4. PowerShell β†’ Export Reports

πŸ’Ύ DLL Reference and Technical Details

⚠️ 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.

DLL Locations

  • 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.

Core ShareGate DLLs

ShareGate's DLLs
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 logic

Database & Storage DLLs

  • SnapDb.dll - NoSQL database engine
  • protobuf-net.dll - Protocol Buffers serialization
  • Sharegate.Logging.dll - Logging infrastructure

βš™οΈ ShareGate Configuration Files

ShareGate stores various configuration settings in JSON format. These files control different aspects of the application:

Configuration File Details

πŸ“„ application-settings.json - Main application configuration
  • UI theme preferences (light/dark mode)
  • Window size and position
  • Performance settings (concurrent operations)
  • Auto-update preferences
  • Telemetry settings
json
1
2
3
4
5
6
7
8
9
10
11
{
"theme": "light",
"maxConcurrentOperations": 4,
"autoUpdate": true,
"telemetryEnabled": true,
"windowState": {
"width": 1200,
"height": 800,
"maximized": false
}
}
πŸ“„ connection-settings.json - Connection and authentication
  • Saved SharePoint site connections
  • Authentication method preferences
  • Proxy server configuration
  • Timeout settings
  • SSL/TLS preferences
json
1
2
3
4
5
6
7
8
{
"defaultAuthMethod": "Modern",
"connectionTimeout": 30000,
"useProxy": false,
"validateCertificates": true,
"retryAttempts": 3,
"sslProtocol": "Tls12"
}
πŸ“„ user-preferences.json - User-specific migration defaults
  • Default copy options
  • Preferred migration settings
  • Notification preferences
  • Export format defaults
  • Error handling preferences
json
1
2
3
4
5
6
7
8
9
10
11
{
"defaultCopyOptions": {
"preservePermissions": true,
"preserveMetadata": true,
"versionLimit": 10,
"includeVersions": false,
"preserveAuthors": true
},
"exportFormat": "xlsx",
"notificationSound": true
}
πŸ“„ recent-connections.json - Quick access history
  • Recently accessed SharePoint sites
  • Teams and M365 Groups connections
  • Last access timestamps
  • Connection metadata
  • Quick connect favorites
json
1
2
3
4
5
6
7
8
9
10
11
12
{
"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.

πŸ› οΈ Maintenance Scripts

Health Check Script

Purpose: Quickly assess the health of your ShareGate installation by checking total data size and identifying old log files that may impact performance.

powershell
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
# ShareGate Health Check Script
function Test-ShareGateHealth {
$data = "$env:LOCALAPPDATA\Sharegate\userdata"
# Check total size
$totalGB = (Get-ChildItem $data -Recurse |
Measure-Object Length -Sum).Sum / 1GB
# Check old logs count
$oldLogs = Get-ChildItem "$data\applogs" -Filter "*.sdb" |
Where-Object { $_.LastWriteTime -lt (Get-Date).AddDays(-90) }
# Display health status
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

Backup Script

Purpose: Create a backup of critical ShareGate data (migration history, scheduled jobs, and reports) while excluding temporary cache files.

powershell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Backup ShareGate Data
$timestamp = Get-Date -Format "yyyyMMdd-HHmmss"
$backupPath = "$env:USERPROFILE\Desktop\ShareGate-Backup-$timestamp"
# Create backup directory
New-Item -ItemType Directory -Path $backupPath -Force
# Backup migration data (excluding cache)
$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

Performance-Based Cleanup Script

Purpose: Clean up cache and archive old applogs when ShareGate performance degrades. Only run this when you experience slow task loading times.

powershell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Performance-Based Cleanup Script (Run ONLY when ShareGate is slow)
$shareGateData = "$env:LOCALAPPDATA\Sharegate\userdata"
# 1. Clear cache
Remove-Item "$shareGateData\cache\*" -Recurse -Force -ErrorAction SilentlyContinue
Write-Host "βœ“ Cache cleared" -ForegroundColor Green
# 2. Archive old applogs (>90 days)
$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
}
# 3. Display space recovered
$newSize = (Get-ChildItem $shareGateData -Recurse |
Measure-Object Length -Sum).Sum / 1GB
Write-Host "βœ“ Current size: $([Math]::Round($newSize, 2)) GB" -ForegroundColor Green

⚑ Additional Technical Details

SnapDb Technology

  • πŸ“¦ Binary key-value store
  • 🌳 B+Tree indexing
  • πŸ” Custom serialization
  • ⚠️ No SQL support

Understanding .SDB Files (Serialization Details)

.SDB files are ShareGate’s proprietary storage format for Task History:

  • What they are: Binary files containing serialized .NET objects
  • Where created: In %LOCALAPPDATA%\Sharegate\userdata\applogs\ as numbered files (10000001.sdb, 10000002.sdb, etc.)
  • When created: Each migration session creates a new .sdb file
  • What they contain: Complete details of every item migrated, including success/failure status, metadata, and error messages
  • How 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

PowerShell Cmdlets Reference

πŸ“Š Reporting Cmdlets

πŸ“ Copy Cmdlets (Generate Logs)

πŸ“š Full PowerShell Documentation β†’

Conclusion

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.

Key Takeaways

  1. Monitor your applogs folder size - Keep it under 10GB for optimal performance
  2. Export data regularly - Use PowerShell cmdlets to export migration history
  3. Clean up periodically - But only when performance degrades
  4. Backup before cleanup - Always preserve your migration data
  5. Understand the architecture - Knowledge helps in troubleshooting and optimization

About This Research

Research conducted by Denis Molodtsov
SharePoint & Migration Expert

πŸ”— LinkedIn: /in/molodtsovd
🌐 Blog: spdenis.com

Experienced in various migrations involving ShareGate. Assistance available if needed.

For SharePoint Migration Specialists seeking to understand ShareGate’s inner workings.


Tags

ShareGateSharePointPowerShellMigrationM365Research

Share

Previous Article
Microsoft 365 Copilot - Lessons Learned
Denis Molodtsov

Denis Molodtsov

Microsoft 365 Architect

Related Posts

PnP.PowerShell App Registration
PnP.PowerShell App Registration
August 05, 2025
1 min

Quick Links

AboutAll Posts

Social Media