5 1 0:Exclude with File Patterns
Overview
When setting up a backup task, you not only specify the source for your backup, but you can also define any files or patterns you want to exclude from the backup process. Excluding items from backup helps reduce storage requirements and eliminates unnecessary or redundant files and directories.
Excluding files and folders using file patterns is available on systems that support wildcard-based file matching. When configuring a backup task in the GUI, you can use option File pattern and then specify the items you want to exclude in the field Exclude List.
Note that on Linux, exclusions can only be specified using regular expressions (regex exclude).
For more details and instructions, see Creating Exclude List.
Excluding items with file patterns
File patterns are used to match against file or directory names and paths. The supported operators include:
- * (asterisk)
- Used to represent zero or any number of characters, except
/
. - ? (question mark)
- Matches a single occurrence of any character, except
/
.
To exclude a specific file or directory at a particular location, include the entire path to that file or directory in the exclusion list. Additionally, if you want to exclude multiple items, separate each one with a comma.
Examples
Below are some examples that show how file patterns can be used to exclude items from your backups:
- Backing up /var, without /var/tmp but including /var/tmp1:
./var/tmp
- Backing up /var without any directory containing the string tmp:
/tmp*
- Backing up source /usr, avoiding files such as *.o, *.tmp, a.out, old*.c, and all directories starting with old:
*.o, *.tmp, a.out, old*.c, /old*
- Backing up /usr, without directories /usr/var/spool and /usr/var/log:
/usr/var/spool, /usr/var/log
- Avoiding all log files starting with syslog:
/syslog*.log
- Backing up NetWare NSS Volume VOL1: without VOL1:tmp:
VOL1:tmp
See also
Creating Exclude List - Exclude with Regular Expressions - Advanced Backup and Restore Options