An auction script has the following directory structure
/var/www/html/
file1
file2
/var/www/html/subdir1/
/var/www/html/subdir2/
/var/www/html/subdir3/
/var/www/html/subdirN/
/var/www/html/uploaded/
.htaccess
file3
file4
/banners/
file5
file6
/cache/
file7 <<< exclude
file8 <<< exclude
/hledmd7phk4u5glq5rks8kb621/ <<< exclude
file9 <<< exclude
file10 <<< exclude
/ad0hmd7phk4u5glq5rks8kb258/ <<< exclude
file11 <<< exclude
file12 <<< exclude
/zfddfd7phk4u5glq5rks8kb584/ <<< exclude
file13 <<< exclude
file14 <<< exclude
A Ubuntu 14.04 tar is being run in crontab -e nightly at present that backs up the entire directory from the /var/www/html/ level using absolute paths. A new tar backup command is needed that will reduce the size of the nightly backup by excluding the combination of files and directories shown above while:
1) including the directory/var/www/html/uploaded/cache/ while excluding the contents under /var/www/html/uploaded/cache/
2) excluding the long list of ever changing MD5 directory names and their contents that are created under /var/www/html/uploaded/
Is there a way to do this in one tar command?