SSH Tar GZip Zip Backup and Restore

By North Street, A Creative Studio

SSH into server, then use this command to compress:

tar -zcvf folder_name.tar.gz folder_name/

To decompress into the current directory, use the following:

tar -vxzf folder_name.tar.gz

NOTE: If you get an error using the above, then try:

unzip folder_name.tar.gz

EDIT: When create a tar file on mac, it adds all the extended attribute files, that start with “._”…. These will show up on the webserver when you extract using the above command. If this annoys you as much as it does me, then do the following to remove them.

find -name "._*" -exec rm -rf {} \;

Want to know how to upload or download a zip file through ssh? use SCP:


About north street

We engineer the thoughtful transformation of great organizations. Our proven process helps us understand what your competitors are doing right — and wrong. Want to learn more? Let’s chat.

More Notes

A bowler hat with radio waves behind it

From Layoff to Leadership: Tom Conlon’s Journey to a Prosperous Business

Welcome to Your 2024 Branding Pep Talk

A bowler hat with radio waves behind it

CEO Tom Conlon talks shop on Podcast Marketing Secrets