- Compatible XF 2.x versions
- 2.3
- Additional requirements
- PHP 7.4+ (PHP 8.1 - 8.3 recommended), MySQL 5.7+ / 8.0+ / 9.0+, pdo_mysql, openssl, zlib
- License
- MIT License
Large SQL Importer & Chunk Merger
Restores large XenForo databases directly from Admin CP or CLI when phpMyAdmin times out, server memory limits trip, or your MySQL database is offline.
Why this exists
Web-based database tools choke on multi-gigabyte dumps. You get 504 gateway timeouts or out-of-memory errors halfway through big tables like
This add-on provides a high-performance streaming MySQL importer and multi-part chunk reassembler integrated natively into XenForo 2.3. It runs in small micro-batches under 16 MB of PHP memory, bypassing web server timeout constraints with pause/resume state persistence.
It also works as the official companion utility for [Olakunlevpn] Telegram Free Cloud Backup. When automated backups split your database into multi-part chunks (
Key Capabilities
How to use
Requirements
Restores large XenForo databases directly from Admin CP or CLI when phpMyAdmin times out, server memory limits trip, or your MySQL database is offline.
Why this exists
Web-based database tools choke on multi-gigabyte dumps. You get 504 gateway timeouts or out-of-memory errors halfway through big tables like
xf_search_index or xf_post.This add-on provides a high-performance streaming MySQL importer and multi-part chunk reassembler integrated natively into XenForo 2.3. It runs in small micro-batches under 16 MB of PHP memory, bypassing web server timeout constraints with pause/resume state persistence.
It also works as the official companion utility for [Olakunlevpn] Telegram Free Cloud Backup. When automated backups split your database into multi-part chunks (
.part01, .001) or encrypt them with AES-256-CBC, this tool reassembles and decrypts them directly on your server with zero data loss.Key Capabilities
- Admin CP Runner & Dashboard: Manage staged dumps, inspect live server PHP limits, test database connectivity, and stream imports inside Admin CP under Tools → Large SQL Importer.
- First-Class CLI Command: Run headless background imports and mergers via
php cmd.php xf-addon:large-sql-importer. - Emergency Standalone Recovery: If your MySQL tables are dropped or corrupt and XenForo cannot boot, execute
php src/addons/Olakunlevpn/LargeSqlImporter/standalone.phpto restore your database with zero framework dependencies. - Streaming Architecture: Reads SQL dumps in 4 MB batches. Foreign key checks and unique constraints are handled automatically.
- On-The-Fly Gzip Decompression: Imports compressed
.sql.gzarchives directly without unpacking multi-gigabyte files to disk. - Chunk Merger & AES-256 Decryptor: Automatically detects, validates, merges, and decrypts split backup chunks created by [Olakunlevpn] Telegram Free Cloud Backup.
- State Persistence & Crash Recovery: Tracks byte offsets in JSON state files. If a network blip occurs, resume immediately right where you left off.
- Database Config Tester: Preloads credentials from
src/config.phpand tests MySQL connectivity directly from the interface.
How to use
- Install: In your Admin CP, go to Add-ons → Install / upgrade from archive and upload the ZIP (or extract to forum root and click Install).
- Stage your dump: Place your
.sql,.sql.gz, or backup chunk files into:
Code:internal_data/sql_import/ - Import via Admin CP: Navigate to Tools → Large SQL Importer and click Launch Large SQL Importer.
- Import via Terminal / CLI:
Code:# Check staged files and chunk sets php cmd.php xf-addon:large-sql-importer --action=list # Run streaming SQL import php cmd.php xf-addon:large-sql-importer --action=import --file=forum_dump.sql # Merge and decrypt split Telegram backup chunks php cmd.php xf-addon:large-sql-importer --action=merge --base-name=backup.sql.gz --key=YOUR_AES_KEY - Emergency Offline Mode (corrupt / dropped database):
Code:php src/addons/Olakunlevpn/LargeSqlImporter/standalone.php
Requirements
- XenForo 2.3.0+
- PHP 8.0 through 8.3
- MySQL 5.7+ / 8.0+ / 9.0+ or MariaDB 10.3+
- PHP Extensions:
mysqliorpdo_mysql,openssl(for AES-256 decryption),zlib(for gzip decompression)
- Related resources