linux tar all files except a certain file code example
Example: tar exclude directory
$ tar --exclude='./folder' --exclude='./upload/folder2' -zcvf /backup/filename.tgz .
$ tar --exclude='./folder' --exclude='./upload/folder2' -zcvf /backup/filename.tgz .