Knowledgebase

How to Compress and Extract .tar.gz and .zip Archives on Linux Print

  • 0

Package website files for migration or extract uploaded archives quickly.

Step-by-Step Instructions

  1. Use tar -czvf to create a compressed .tar.gz archive.
  2. Use tar -xzvf to extract .tar.gz archives.
  3. Install unzip to extract .zip files.
tar -czvf backup.tar.gz /var/www/html
tar -xzvf backup.tar.gz -C /restore/
sudo apt install -y unzip && unzip site.zip

Pro Tip: Using .tar.gz preserves Linux file permissions and ownership.

Need assistance? Open a ticket in the A1 Client Area or contact our 24/7 NOC Engineering Team on WhatsApp at +1 (406) 229-9597.


Was this answer helpful?

« Back