Gunzip

How to import mysql dump (.gz or .sql) into a database?

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.
Continue Reading…

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

How to Compress, Uncompress to .gz, .bz2?

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.
Continue Reading…

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Gunzip, Bunzip, Unzip with tar

Bunzip, Unzip

To bunzip a folder, use the command

$ tar jcvf dump.tar.bz folder/

Transfer the file to the location of your choice. For e.g. /tmp and issue the following command to unzip

[/tmp] $ tar -jxvf dump.tar.bz
Continue Reading…

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
Kurinchi Calendar
September 2017
M T W T F S S
« Jul    
 123
45678910
11121314151617
18192021222324
252627282930