Import large dump
Jun 12, 2020
To import a large dump (~300GB) you could do:
Split your file first:
csplit -s -ftable dump.sql "/-- Table structure for table/" {999} You could also use the pattern {*} but you need the gcsplit:
pkg install coreutils BSD csplit don’t support {*}
Then try:
gcsplit -s -ftable dump.sql "/-- Table structure for table/" {*} Create small INSERT chunks:
gsplit -a 3 -d -n l/200 table05 x_ l/N split into N files without splitting lines/records
…