While this command is absolutely correct, I prefer to compress the containing folder when archiving my sites. There are two reasons for this technique. First, you don’t end up with the archive file mixed in with the files that it contains. Secondly, you don’t end up with really messy directories when you inevitably decompress an archive at the wrong location. In fact, I prefer to archive to a “backups” directory under my root, but that’s of no consequence for my example.
I would suggest using “tar -czf mydomain.com_YYYYMMDD.tgz mydomain.com” from the parent directory. (substituting the current date for YYYYMMDD of course)