You don't need to put the entire path in, just the name of the file/directory you want to exclude so tar --exclude=directory-to-exclude -cvf /path/to/directory/to/tar should work, it works for me in my backup scripts