OpenSimWorld is the directory of 3D Virtual Worlds based on OpenSimulator and connected through the HyperGrid. Learn More

Monster dump of 900GB in size:
IMPORTING A HUGE MYSQL/MARIADB DUMP FROM WINDOWS TO DEBIAN

This guide describes a proven and stable way to import a very large
MySQL/MariaDB dump (hundreds of GB to ~1 TB) from a Windows server into
MariaDB on a Debian server.

The procedure avoids double disk usage, survives network disconnects,
and prevents common errors like “server has gone away”.

----------------------------------------------------------
PREREQUISITES
----------------------------------------------------------
- Windows Server with dump.sql (e.g. D:.sql) - Debian
Server with enough free disk space - MariaDB installed and
running - Root access to MariaDB - Network access between
Windows and Debian

----------------------------------------------------------

1. WINDOWS: SHARE THE DUMP DIRECTORY

- The dump file is located on drive D:
- Share the drive (or directory) via Windows file sharing (SMB)
- Example: Share name: d Path: D:
- Grant read permissions to the Administrator account

----------------------------------------------------------
2. DEBIAN: MOUNT WINDOWS SHARE (CIFS/SMB)
----------------------------------------------------------
Install required tools: apt install -y cifs-utils screen

Create mount point: mkdir -p /mnt/windowsdump

Mount the Windows share: mount -t cifs //WINDOWS_IP/d
/mnt/windowsdump -o username=Administrator,vers=3.0

Verify: ls -lh /mnt/windowsdump You should see dump.sql.
----------------------------------------------------------

3. PREPARE MARIADB FOR LARGE IMPORTS

Create the target database: mysql -u root -p CREATE DATABASE griddb;
EXIT;

Create configuration file: nano
/etc/mysql/mariadb.conf.d/99-bigimport.cnf

Content: [mysqld] max_allowed_packet=1G net_read_timeout=600
net_write_timeout=600 wait_timeout=28800 interactive_timeout=28800

Restart MariaDB: systemctl restart mariadb

Verify setting: mysql -u root -p -e “SHOW VARIABLES LIKE
‘max_allowed_packet’;”

----------------------------------------------------------
4. START THE IMPORT SAFELY USING SCREEN
----------------------------------------------------------
Start a screen session: screen -S sqlimport

Run the import: mysql –max_allowed_packet=1G -u root -p
griddb < /mnt/windowsdump/dump.sql

Detach screen (import keeps running): CTRL + A, then D
----------------------------------------------------------

5. MONITORING

Check if import is running: ps aux | grep mysql

You should see: mysql –max_allowed_packet=1G -u root -p griddb

CPU and disk usage are expected to be high.

----------------------------------------------------------
6. COMPLETION
----------------------------------------------------------
The import is finished when the mysql process disappears.

Unmount the Windows share: umount /mnt/windowsdump
----------------------------------------------------------

COMMON ERRORS AND SOLUTIONS

ERROR 2006 (server has gone away): - Increase max_allowed_packet -
Increase net_read_timeout / net_write_timeout

Packet bigger than max_allowed_packet: - Ensure both server and client
use 1G packet size

Import aborted due to network loss: - Always run the import inside
screen

-------
NOTES
-------

- Imports of this size may take 12–36 hours
- Silence during import is normal
- Do not interrupt the process