Tar

From DevOps Notebook

Exclude file or folder from tar archive

$ tar --exclude='./uploads' --exclude='./uploads/folder2' -zcvf /backup/filename.tgz .