AMANDA-MATCH(7)
π NAME π
amanda-match β Common Amanda Match Expression π
πΈ DESCRIPTION πΈ
okay so bestie, several Amanda commands let you specify dumps using βmatch expressionsβ β¨ and this page is literally the syntax guide for those expressions.
In some places, only certain match expressions are allowed. But a bunch of commands take a dump specification (βdumpspecβ) made of a sequence of several expressions intended to match particular dumps in the catalog. Other applications take a DLE specification, which indicates a set of DLEs to be operated on. Both formats are described below π
You can disable an expression by putting the = character in front of it β in that case, an exact match is used. Many programs also have an --exact-match argument that disables expressions and uses exact matching instead π
π¦ HOST & DISK EXPRESSIONS π¦
Hosts and disks match by word. Each word is a glob expression, and words are separated by the character . for host expressions and / for disk expressions. You can anchor the expression on the left with ^ or on the right with $. The matcher is case insensitive for hosts but case sensitive for disks. A match succeeds if all words in the expression match contiguous words in the host or disk β
If the disk is a UNC disk ("\\windows\share"), then all \ are converted to / before the match. Using \ is complicated because of the extra quoting required by the shell and Amanda. Itβs easier to use / because it requires less quoting ("//windows/share") π«Ά
The special characters follow. Note that the shell interprets some of these characters, so when used on the command line, they must be escaped appropriately for the shell. π
dot (.)β word separator for a host/β word separator for a disk\β word separator for a UNC disk^β anchor at left of word$β anchor at right of word?β match exactly one character except the separator*β match zero or more characters except the separator**β match zero or more characters including the separator[...]β match exactly one of the characters enclosed by the brackets[!...]β match exactly one character that is not enclosed by the brackets
β¨ Examples β¨
hostaβ Will matchhosta,foo.hosta.org, andhoSTA.dOMAIna.ORGbut nothostb.hostβ Will matchhostbut nothosta.host?β Will matchhostaandhostb, but nothostorhostabc.ho*naβ Will matchhoinabut notho.aina.org.ho**naβ Will matchhoinaandho.aina.org.^hostaβ Will matchhostabut notfoo.hosta.org.sda*β Will match/dev/sda1and/dev/sda12./optβ Will match the diskoptbut not the hostopt.(note dots:) .opt.β Will match the hostoptbut not the diskopt./β Will match the disk/but no other disk./usrβ Will match the disks/usrand/usr/local./usr$β Will match the disks/usrbut not/usr/local.shareβ Will match the disks\\windows1\shareand\\windows2\share.share*β Will match the disks\\windows\share1and\\windows\share2.//windows/shareβ Will match the disk\\windows\share.
π DATESTAMP EXPRESSIONS π
A datestamp expression is either a prefix of the datestamp, or a range expression (separated by -) matching several prefixes. A leading ^ is removed, while a trailing $ will force an exact match β°
π Examples π
20001212-14β match all dates beginning with20001212,20001213or2000121420001212-4β same as previous20001212-24β match all dates between20001212and200012242000121β match all dates that start with2000121(20001210-20001219)2β match all dates that start with2(20000101-29991231)2000-10β match all dates between20000101-20101231200010$β match only200010
π LEVEL EXPRESSIONS π
Level expressions are either prefix matches β e.g. "1", which matches "1", "10", and "123" β absolute matches β e.g. "3$", which only matches "3" β or a range β e.g. "3-5", which only matches levels 3, 4, and 5 π₯
π₯ DUMP SPECIFICATIONS π₯
A dump specification is used to select one or more dumps from the catalog. It consists of a sequence of match expressions in the order host, disk, datestamp, and level. Note that some commands do not take a level argument, out of historical accident π Note, too, that the datestamp expression matches the time that the dump was made on the Amanda client, rather than the date it was moved to tape π
π Examples π
amtool MyConfig ^vpdesktop$
β all dumps of host "vpdesktop"
amtool MyConfig '*' /var/stage
β All dumps of /var/stage on any host
amtool MyConfig www1 /var/www '*' www2 /var/www '*'
β All dumps of /var/www on www1 and www2 (assuming amtool does not require a level argument)
π DLE SPECIFICATIONS π
A DLE specification is used to select one or more DLEs. It consists of a sequence of match expressions. The first must be a host, and subsequent expressions will be experimentally matched against both hosts and disks in the disklist(5), preferring hosts. This dynamic matching process can lead to odd behavior in extreme cases (e.g., where a disk and a host have the same name), but for most uses it does exactly what is expected π¦
β Examples β
amtool MyConfig vpdesktop /home/anderson
β /home/anderson on host vpdesktop
amtool MyConfig '*' ^/etc '*' ^/var
β All DLEs matching ^/var or ^/etc on any host
amtool MyConfig web1 www web2 www
β If no host matches "www", all DLEs matching www on hosts web1 and web2. If a host matches "www", then all DLEs on hosts www, web1, and web2.
π«Ά SEE ALSO π«Ά
amanda(8), amanda(8), amfetchdump(8), amrestore(8), amadmin(8), amvault(8), amflush(8), amdump(8)
The Amanda Wiki: : http://wiki.zmanda.com/
π AUTHOR π
Dustin J. Mitchell <dustin@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
xoxo π β from Amanda 3.5.4, dated 07/23/2025, page AMANDA-MATCH(7) (thatβs the footer, bestie, not a copy-paste π)
π¦ where this page comes from
- fedora 43: amanda 3.5.4-17.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms