I have a magento installation I would like to tar. As some of you may now, in the root directory of a Magento installation is a directory called "media". This is the directory where all product images are stored.
I want to tar the entire Magento installation, without this directory. As this is not needed when developping, only on live server.
I have experienced with the --exclude option for tar, however, this excludes all directories called "media". I only want to skip the subdirectory media in the root.
Example root directory I want to tar:
/app /app/media -> I do not want to exclude this /lib /js /media -> I want to exclude this /skin ...etc
Normally I use tar -pcvzf filename.tar . to compress the whole directory. What would be the command to use to exclude the root media directory?