echo .dump | sqlite3 metadata.db > metadata.sql sqlite3 fixed.db < metadata.sql mv fixed.db metadata.db