This command will allow you to make a tar ball with gzip compression:

-c = Create
-v = Verbosely list files processed
-z = Filter the archive through gzip
-p = Preserve Permissions ( extract all protection information)
-f = Use archive file or device F

tar -pvczf BackUpDirectory.tar.gz /path/to/directory

//Back up a directory but exclude .hidden files
tar --exclude=".*" -pvczf BackUpDirectory.tar.gz /path/to/directory
Back up a directory but exclude .hidden files