Compress file through the Terminal
Step 1. Open the terminal.
Step 2. Login through the SSH
ssh {user_name}@{host_name}
Step 3. Press Enter then it will ask for the Password after entering the Password you will be logged in.
Step 4. Navigate to the folder where is the backup file is and run this command
tar -cvzf {filename_after_zip}.tgz {actual_file_name}
Press Enter then it will compress the database backup in the tgz format.
Decompress the file through the Terminal
Step 1. Open the terminal.
Step 2. Login through the SSH
ssh {user_name}@{host_name}
Step 3. Press Enter then it will ask for the Password after entering the Password you will be logged in.
Step 4. Navigate to the folder where is the backup file is and run this command
tar xvf {filename}.tgz
Press the enter then it will decompress the file.
Hope this will help to someone.