/* Creating A Backup of database in gz format */
mysqldump -u root -p dbname | gzip -9 > dbname.sql.gz
/* Restore database in gz format in mysql */
gunzip < dbname.sql.gz | mysql -u root -p dbname
/* create a tar.gz archive from a given folder */
tar -zcvf tar-archive-name.tar.gz source-folder-name
/* extract a tar.gz compressed archive */
tar -zxvf tar-archive-name.tar.gz
rsync -avP username@remote_host:/home/username/dir1 place_to_sync_on_local_machine