Create a tar.gz archive of a directory while preserving permissions of files and sub-directories

tar -pczf name_of_your_archive.tar.gz /path/to/directory