AMRESTORE(8)

πŸ’– AMRESTORE πŸ’– β€” lowkey data-extraction from Amanda volumes (section 8, for the sysadmin girlies)

okay so bestie, welcome to amrestore, a manual page from the System Administration Commands corner of the universe. this one is very specific and very powerful, and it does not play by the usual Amanda rules. let's get into it 🫢


✨ NAME ✨

amrestore β€” low-level data-extraction from Amanda volumes

yes literally that's it. low-level extraction. bare metal energy. πŸ’…


✨ SYNOPSIS ✨

amrestore [--config config] [-r | -c | -C] [-b blocksize] [-f filenum]
          [-l label] [-p] [-h] [--exact-match]
          [--continue-on-filter-error] [-o configoption...]
          [{changerspec} | {[--holding] holdingfile}]
          [hostname [ diskname [ datestamp [ hostname [ diskname [ datestamp ... ] ] ] ] ]]
🚨 attention bestie β€” this is the only Amanda command that does not take a configuration name as its first argument. every other one does. this one said "not me, I'm different" πŸ™ˆ periodt.

✨ DESCRIPTION ✨

amrestore is a very low-level tool for extracting data from Amanda volumes. like, so low level. it does not consult any catalog information or other metadata β€” it bases everything it does only on the headers found on the volume itself. nothing else. no notes, no catalog, no vibe check.

which makes it the perfect little tool for bare-metal restores of an Amanda server, or any other situation where the catalog is simply not available. iconic for emergencies, fr fr.

if you want the higher-level recoveries, go look at amfetchdump(8) and amrecover(8). those are the ones who actually know things.

here's the tea though: this tool does not reassemble split dumps. it can uncompress compressed dumps, but ⚠️ decompression may fail for split parts after the first. if that happens to you, the move is:

  1. extract the parts without decompressing
  2. concatenate them
  3. decompress the result

you got this. 🫢

so where does the data come from? from the current volume in changerspec, or from the holding file holdingfile. in most cases changerspec is gonna name a particular device, like tape:/dev/nst0 or s3:mybucket/tape-1. πŸ’Ύ

and only dumps matching the dump specification that begins with hostname get extracted. if you don't give a specification at all, then every file on the volume (or the entire holdingfile) is restored. everything. the whole thing. 🌈

for the full deets, hit up the "DUMP SPECIFICATIONS" section of amanda-match(7).

unless you use -p, candidate backup images get extracted to files in the current directory, named exactly like this:

hostname.diskname.datestamp.dumplevel


✨ OPTIONS ✨

  • -b blocksize β€” use the given blocksize to read the volume. the default is defined by the device itself, so it's giving "the device handles it, I don't have to".
  • -f filenum β€” seek to file filenum before starting the restore operation. skip ahead, bestie. ⏭️
  • -l label β€” check that the volume has the label label. a lil vibe check, but for tapes.
  • -p β€” pipe the first matching file to standard output. this is the classic shell-pipeline move: send the data to something like tar for extraction. chef's kiss.
  • -c, -C β€” if the file is not already compressed, compress it using the fastest (-c) or best (-C) compression algorithm. note that amrestore will not re-compress an already-compressed file β€” it knows better. without either of these options, amrestore will automatically uncompress any compressed files. this option is useful when the destination disk is small. slay for storage-constrained girlies. πŸ“
  • -h β€” include 32k headers on all output files, similar to a holding file. this header can be read by another application or utility (see Amanda::Header) during the next phase of processing. handing off the baton. πŸƒβ€β™€οΈ
  • -r β€” output raw files. this is similar to -h, but it also disables any automatic decompression and/or decryption. output file names will have a .RAW extension. no touchy, raw only. πŸ”₯
  • --exact-match β€” the host and disk are parsed as exact values. no fuzzy matching, no guesswork.
  • --continue-on-filter-error β€” continue to the next dump if a filter (decompression/decryption) fails. keep it moving, we don't dwell. πŸ’…
  • -o configoption β€” see the "CONFIGURATION OVERRIDE" section in amanda(8).

✨ EXAMPLES ✨

interactive restore of a specific disk πŸŽ€

the following does an interactive restore of disk rz3g from host seine, to restore particular files. note the use of the b option to restore, which causes it to read in units of two 512-byte blocks (1 Kbyte) at a time. this helps keep it from complaining about short reads. πŸ™

amrestore -p /dev/nrmt9 seine rz3g | tar -xv

extracting everything for one host πŸ’–

the next example extracts all backup images for host seine. this is a typical way to extract all data for a host after a disk crash. we love a disaster-recovery moment.

amrestore /dev/nrmt9 seine

if the backup datestamp in the above example is 20070125 and seine has level 0 backups of disks rz1a and rz1g on the tape, these files will be created in the current directory:

seine.rz1a.19910125.0
seine.rz1g.19910125.0

(and yes bestie, that datestamp in the filenames is exactly what the page says. we keep it verbatim in here. no editing, no "fixing", periodt. 🀐)

pulling from a holding disk file 🌸

you may also use amrestore to extract a backup image from a holding disk file that has not yet been flushed to tape:

amrestore -p /amanda/20001119/seine.rz1a.2 | tar -xv

✨ CAVEATS ✨

⚠️ GNU-tar must be used to restore files from backup images created with the GNUTAR dumptype. vendor tar programs sometimes fail to read GNU Tar images. so like… bring GNU-tar. that's the whole rule. 😭

✨ SEE ALSO ✨

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


✨ AUTHORS ✨

  • James da Silva <jds@amanda.org>
  • Stefan G. Weichinger <sgw@amanda.org>
  • Dustin J. Mitchell <dustin@zmanda.com> β€” Zmanda, Inc. (http://www.zmanda.com)

and that's the whole page, bestie!! πŸ¦‹ this gorgeousness is Amanda 3.5.4, dated 08/26/2026 β€” and amrestore is still out here saving your entire server from the void. no cap, that's iconic behavior. go restore something. πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from