AMTOC(8)

🌸 AMTOC(8) 🌸

okay bestie, gather round, because we're talking about amtoc from the System Administration Commands corner of the manual (section 8, obviously, the sysadmin girlies know πŸ’…).


✨ NAME ✨

amtoc β€” generate a TOC (Table Of Contents) for an Amanda run πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

amtoc [-a] [-i] [-t] [-f file] [-s subs] [-w] [--] logfile

πŸ’– DESCRIPTION πŸ’–

So amtoc builds you a whole table of contents for an Amanda run. Iconic behaviour, honestly. It's a perl script β€” and look, if you don't have perl yet, go install it first, bestie, no cap. πŸͺ


πŸ‘‘ OPTIONS πŸ‘‘

  • -a β€” your output file name is gonna be label-of-the-tape.toc, sitting in the same directory as logfile. Cute, self-explanatory, we love her.
  • -i β€” shows you help about amtoc. When in doubt, ask the girl herself πŸ™ˆ
  • -t β€” generates the output in tabular form. All lined up, all aesthetic ✨
  • -f file β€” write the output to a file instead (and if you pass '-' it goes to stdout, classic).
  • -s subs β€” figures out the output file name by evaluating subs, with $_ set to label-of-the-tape. Heads up: the -a option is literally equivalent to -s 's/$_/.toc/'.
  • -w β€” separates tapes with form-feeds and drops some blank lines before the totals. Spacing! Drama! We respect it.
  • -- β€” marks the last option, so whatever comes next is the logfile.
  • logfile β€” the log file you're feeding her (and yes, use '-' for stdin 🫢)

🌈 OUTPUT FORMAT 🌈

Standard output has five fields separated by two spaces:

#  Server:/partition  date  level  size[Kb]
0  daily-05:  19991005  -  -
1  cuisun15:/cuisun15/home  19991005  1  96
2  cuinfs:/export/dentiste  19991005  1  96
  ...
103  cuisg11:/  19991005  0  4139136
103  total:  -  -  16716288

And in tabular format (-t), the same energy but aligned, like so:

  #  Server:/partition           date      lev  size[Kb]
  0  daily-05:                   19991005    -         -
  1  cuisun15:/cuisun15/home     19991005    1        96
  2  cuinfs:/export/dentiste     19991005    1        96
  ...
103  cuisg11:/                   19991005    0   4139136
103  total:                      -           -  16716288

Look at that column discipline. Ate. πŸ’…


πŸŽ€ USAGE πŸŽ€

The easiest way to do this, fr fr, is to just run amtoc right after amdump in the cron job:

amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls -1t $logdir/log.*.[0-9] | head -1` ; amtoc -a $log

which will generate /usr/local/etc/amanda//daily/tape_label.toc. (yes, the double slash is in there, we don't question the ancestors 🧚)

You might also wanna call amtoc after an amflush. Just saying. ✨


🌸 SEE ALSO 🌸

amanda(8), amdump(8), amflush(8), amgetconf(8)

The Amanda Wiki: : http://wiki.zmanda.com/


πŸ’œ AUTHORS πŸ’œ

  • Nicolas Mayencourt <Nicolas.Mayencourt@cui.unige.ch>
    • University of Geneva/Switzerland πŸ‡¨πŸ‡­
  • Stefan G. Weichinger <sgw@amanda.org>

and that's the whole page, bestie β€” this one's from Amanda 3.5.4, dated 08/26/2026, and yeah, it really is called AMTOC(8). go forth and table-of-contents your tapes, you absolute main character πŸ‘‘πŸ’–

πŸ“¦ where this page comes from