When moving mysql database from one server to another or, to test that the data backup works as expected we need to import mysql dump file in the testing environment.
Create the database (test-database) in the testing environment and identify the location of the .gz or .sql file.
If the mysql dump was a .gz file, you need to gunzip to uncompress the file by typing
$ gunzip mysqldump.sql.gz
This will uncompress the .gz file and will just store mysqldump.sql in the same location.
Tar (tape archive) does not compress files. They are used for grouping all files in a folder so that it can be transferred across locations. In order to compress the files, you need to use zip, gzip or bzip2 utilities.
gzip, bzip2 are file compression utilities and gunzip, bunzip2 are file uncompression utilities.
bzip2 compresses files to a smaller size compared to gzip, but it takes longer to compress the files. Bzip2 uses Burrows-Wheeler block sorting text compression algorithm (with Huffman coding) and gzip uses Lempel-Ziv coding. so, a file compressed with one utility cannot be uncompressed with the other utility.