
Sometimes there could be an issue with huge DB which was created not with backup_migrate module but raw mysqldump command. The size of the DB could be over 2GB. Most of the data of this dump are cache tables and logs. Editing this file is not a good choice.
Current solution will remove INSERTS from the file. sed command come in handy here:
$ sed -e '/^INSERT INTO `watchdog/d' -e '/^INSERT INTO `cache/d' < db_dump.sql > db_dump_clean.sql
This code will remove all strings which starts with “INSERT INTO `watchdog” и “INSERT INTO `cache”. And create new db_dump_clean.sql file without not needed data.
DB dump I was working with lost about 10 times of it's size!