Excludes regenerable, release-local directories (composer/npm build artifacts, framework caches) from hosting backups by tagging them with a CACHEDIR.TAG file, following the Cache Directory Tagging Specification. This is honored by Mittwald's automatic backups and by common backup/archive tools (rsync, borg, restic, ... with --exclude-caches).
The backup:exclude_cache task runs automatically before deploy:symlink, tagging every directory listed in backup_exclude_dirs (relative to {{release_path}}) that exists in the current release.
The default settings can be found within the set.php file.
set('backup_exclude_dirs', [
'vendor',
'var/cache',
]);Adjust the list per project, e.g. to add framework-specific temp directories, or set it to [] to disable the task entirely.
Directories tagged this way are excluded from backups entirely and cannot be restored, not even by the hoster. Only list directories whose content is fully regenerated by the deploy process (composer install, cache warmup) — never shared or writable directories such as fileadmin, uploads, or var/log.