Resource icon

[Olakunlevpn] Large SQL Importer & Chunk Merger 1.0.0

No permission to download
Compatible XF 2.x versions
  1. 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 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.php to 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.gz archives 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.php and tests MySQL connectivity directly from the interface.



How to use
  1. 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).
  2. Stage your dump: Place your .sql, .sql.gz, or backup chunk files into:
    Code:
    internal_data/sql_import/
  3. Import via Admin CP: Navigate to Tools → Large SQL Importer and click Launch Large SQL Importer.
  4. 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
  5. 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: mysqli or pdo_mysql, openssl (for AES-256 decryption), zlib (for gzip decompression)
  • Screenshot 2026-11-16 at 12.25.51.webp
    Screenshot 2026-11-16 at 12.25.51.webp
    37.4 KB · Views: 1
  • Screenshot 2026-11-16 at 12.25.59.webp
    Screenshot 2026-11-16 at 12.25.59.webp
    42.1 KB · Views: 1
  • Screenshot 2026-11-16 at 12.26.08.webp
    Screenshot 2026-11-16 at 12.26.08.webp
    24.3 KB · Views: 1
  • Screenshot 2026-11-17 at 12.58.48.webp
    Screenshot 2026-11-17 at 12.58.48.webp
    17.5 KB · Views: 1
  • Screenshot 2026-11-17 at 12.58.35.webp
    Screenshot 2026-11-17 at 12.58.35.webp
    90.4 KB · Views: 1
Author
olakunle
Downloads
0
Views
2
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from olakunle

Back
Top Bottom