I created and compressed (with bzip2) a SQL dump from a production server on Linux.
I want to create a shell script to automatically import it in the database of my development environment (on Mac OS).
The file dump.sql.bz2 is well uncompressed manually with Mac OS Archive Utility.
But when I'm using command line such as bzip2 -dck dump.sql.bz2
or bunzip2 -k dump.sql.bz2
, sql file is converted in binary and can't be exploited by mysql (ERROR at line 1: Unknown command '\%'
), as you can see in this screenshot:
Comparison between GUI and CLI bzip2 extraction
What is equivalent command line of Archive Utility to extract a bz2 sql file on Mac without corrupt it? May be it's not the best way do do what I want ?