The include property
As of ZWC 3.3.6, the include
property can be added to an entry in your “/etc/amanda/<BackupSetName>/disklist.conf
” file in the following form:
client-hostname "alias" "path-of-directory-to-backup" { zmc_windows_base include "<PATTERN>" [...snip...]
This directs amanda to back up only those files or folders in the backup object matching the PATTERN
.
Acceptable Patterns
For Windows NTFS backups, the following requirements exist for include patterns:
- must be a relative path, not an absolute path
- ZWC can use the wildcards
*
(one or more of any characters) or?
(one of any characters) for file name globbing - backslashes “
\
” between folder names must be escaped, as “\\
“ - multiple patterns can be appended to a single include property
Here are some working examples for an object that is backing up “C:\
“
Pattern | Effect |
---|---|
include "Program Files\\java" | backup the "C:\Program Files\java" directory |
include "*.doc" "*.pdf" "*.txt" | backup DOC, PDF, and TXT files from all folders under "C:\" |
include "Test\\*.xlsx" | backup XLSX files from any folder named "Test" in all of "C:\" |
Here are some erroneous include patterns:
Pattern | Error |
---|---|
include "C:\Program Files\VMware\Infrastructure" | this is an absolute path |
include "Program Files\Common Files" | the backslash “\ ” has not been escaped |
include "./Program Files" include ".\\Program Files" | the “./ ” and “.\\ ” patterns are not valid |