linux-archiving-quick-guide
1 min read
Linux Archiving Quick Guide
TAR (Recommended for Linux Backups)
Create .tar.gz
tar -czvf backup.tar.gz folder/
Extract .tar.gz
tar -xzvf backup.tar.gz
What the flags mean
| Flag | Meaning |
|---|---|
-c | Create archive |
-x | Extract archive |
-z | Use gzip compression |
-v | Show progress |
-f | Archive filename |
ZIP (Best for Windows Compatibility)
Create ZIP
zip -r backup.zip folder/
Extract ZIP
unzip backup.zip
Recommended Usage
Linux servers / Docker backups
tar -czvf backup.tar.gz folder/
Sharing with Windows users
zip -r backup.zip folder/
Example Backup
tar -czvf vw-data-$(date +%F).tar.gz vw-data/
Example output:
vw-data-2026-05-24.tar.gz