Knowledge Base
What kind of files does CodeGuard exclude from backups?
Overview
By the end of this article you will know which files CodeGuard leaves out of your backups by default, why each type is excluded, and how to request a change to the exclusion list for your website. Exclusions exist because these files are temporary, regenerated automatically, or duplicated elsewhere — leaving them out keeps backups smaller and faster without affecting your ability to restore. The article lists the patterns in seven groups: cache files, temporary files that speed up page loading; log files, records of server activity; operating system (OS) files, metadata created by the server's operating system; other temporary files, short-lived files generated during normal operation; backup files, directories created by other backup tools; the CodeGuard test restore file, a temporary file CodeGuard writes when checking server access; and mandatory exclusions, Git files that CodeGuard must exclude for its backup process to work. A final section explains how to change your exclusion rules.
How to read the patterns
Every list in this article uses pattern matching rather than exact filenames. Three characters have special meaning:
*— a wildcard matching any sequence of characters, including directory names. For example,*matches that path anywhere on your site.?— a wildcard matching a single character. For example,docid_?*.pageCache.*matches a file whose name beginsdocid_followed by at least one character.%%— a literal double percent sign appearing in certain template directory names, not a wildcard.
A file is excluded if its full path matches any pattern in any of the lists below.
Cache files
Cache files are temporary files generated automatically to reduce bandwidth use and server load. They make your website faster, but they take up space in backups and are recreated by your site whenever they are needed, so CodeGuard excludes them.
*/cache/Gantry*/*-cache-Gantry-* */cache/com_content/* */cache/docid_?*.pageCache.* */cache/jw_sig/jwsig_cache_* */cache/jw_sigpro/jwsigpro_cache_* */cache/sigplus/* */cache/smarty/cache/* */cache/smarty/compile/* */cache/t3_assets/* */cache/t3_pages/* */cache/timthumb_ext_* */cache/timthumb_int_* */cache/zend_cache* */captcha/cache/?*.php */fv-gravatar-cache/* */plugins/db-cache-reloaded-fix/cache/* */public_html/templates_c/%%* */scripts/cache/* */smarty_v2/compile/*.tpl.php */system/cache/cache.product.* */var/tmp/* */var/session/* */vgmod/vgcache/* */web/content/administrator/cache/* */web/content/cache/* */web/content/libraries/joomla/cache/* */wp-content/plugins/wp-file-cache/*.cache */wp-content/uploads/headway/cache/* *cache/com_k2/* *cachefs/* *dbcache/* *gt-cache/* *lightspeed/* *minifycache/minify_* *objectcache/* *var/cache* *var/compiled/* *var/full_page_cache/mage* *w3tc/* *wp-content/cache/*
Log files
Log files record server and application activity. They are useful for diagnosing problems, but they are not needed to restore a website, and they grow continuously. CodeGuard excludes them to keep backup sizes down.
*access-logs/* *awstats/* *error_log* *webalizer/* */.cpanel-logs */access-logs/* */logs/access_log* */logs/tasklog* */webalizerftp/* */web/content/logs/*
Operating system (OS) files
Operating systems create files to track their own metadata — for example, resource information added when files are copied from macOS. These files are specific to the system that created them and are not needed to restore a website, so CodeGuard excludes them.
Other temporary files
Beyond cache, log, and OS files, servers create other short-lived files during normal operation — session data, lock files, and form artifacts. These exist only briefly and are regenerated as needed, so CodeGuard excludes them.
*.lock
*.thumb
*/public_html/temporary/%%*
*/session/sess_*
*/uploads/gravity_forms/captcha-*
*/web/content/tmp/*
*/www/temporary/%%*
*wpcf7_captcha/*
Backup files
Directories created by other backup tools contain copies of content CodeGuard already backs up. Excluding them avoids duplicating data and prevents conflicts between backup systems.
*wp-content/infinitewp/backups/*
*backup-db/*
Note for the author: the original article listed *.lock in both this section and Other temporary files. It is retained above under Other temporary files and removed here. Confirm this matches the production exclusion list before publishing.
CodeGuard test restore file
During a test restore, CodeGuard writes a temporary file to your server to confirm it can both read from and write to the server, in case a real restore is needed later. CodeGuard removes the file after the test. Because the file is not part of your website, it is excluded from backups.
codeguard_temporary_test_rest…le.html
Mandatory exclusions
CodeGuard uses the Git revision control system for its differential backup logic, which transfers only the files that changed since the last backup. Certain Git metadata files interfere with that process, so they are always excluded and cannot be re-enabled. The contents of your Git repositories are still backed up — only the Git metadata is excluded.
*.git*
Change your exclusion rules
The lists above are the defaults applied to every site. If a file you need is being excluded, or you want additional files left out of your backups, contact Support | Sectigo® Official with your website name and the pattern you want added or removed. Exclusions in the Mandatory exclusions section cannot be changed, because CodeGuard's backup process depends on them.
Similar questions
-
Why is a file missing from my CodeGuard backup?
-
What is CodeGuard's default exclusion list?
-
Can I back up my cache or log files with CodeGuard?
How do I add a custom exclusion rule to my CodeGuard site?
Need assistance?
Contact our team for help with your purchase or issuing your certificate.