AMRECOVER(8)
okay bestie, gather round π
this is amrecover, and it lives in section 8 of the manual, under System Administration Commands. Think of it as your own personal group chat with Amanda's index files β you browse, you pick, you get your stuff back. Let's go.
β¨ NAME β¨
amrecover β the Amanda index database browser π¦
β¨ SYNOPSIS β¨
amrecover [-s index-server] [-t tape-server] [-d tape-device]
[-h hostname] [-o configoption...] [-C config]
πΈ DESCRIPTION πΈ
So like, what does it actually do? amrecover browses the database of Amanda index files to figure out which tapes contain the files you wanna recover. And it's not just a looker β it can actually recover those files too. Iconic, honestly. π
Now here's the part where you have to pay attention, no cap: if you want your files restored in place, you gotta invoke amrecover from the root of the backed up filesystem, or use lcd to move into that directory. Otherwise? A whole directory tree that resembles the backed up filesystem gets created in your current directory instead. Not the vibe you wanted, but it's what you asked for. Check the examples below for the deets. π
Amrecover will read the amanda-client.conf file and the config/amanda-client.conf file. And if you didn't supply a configuration name on the command line, it'll try the compiled-in default configuration, which is usually DailySet1.
See the amanda(8) man page for more details about Amanda.
π OPTIONS π
Note: the default values are those set at compile-time. Also β useamrestoreto recover client-encrypted or client-custom-compressed tapes. Like,amrecoveris genuinely not the one for those, bestie. π
[ -C ] configβ the Amanda configuration.-sindex-server β the host that runs the index daemon.-ttape-server β the host that runs the tape server daemon.-dtape-device β the tape device to use on the tape server host.-hhostname β the hostname to begin restoring; defaults to the system's hostname.-oclientconfigoption β see the "CONFIGURATION OVERRIDE" section inamanda(8).
π AUTH π
The default auth is 'BSDTCP'. Wanna switch it up? You can set a different auth in the amanda-client.conf file, or by specifying the '-oauth=bsd' command line argument. slay. β¨
π COMMANDS π
Amrecover connects to the index server and then hits you with a command line prompt. Usage is similar to an ftp client, iykyk. And if the GNU readline library was built in to amrecover, you get command line history and editing for free β chef's kiss. π«Ά
The whole point of browsing the database is to build up a restore list of files to be extracted from the backup system. These are the commands you've got:
π sethost hostname
Specifies which host to look at backup files for (default: the local host).
π setdate YYYY-MM-DD-HH-MM[-SS] | YYYY-MM-DD
Set the restore time (default: now). The file listing commands only return info on backup images for this day, for the day before with the next lower dump level, and so on, until the most recent level 0 backup on or before the specified date is encountered. Like a little time-travel ladder. πͺ
For example, if:
1996-07-01 was a level 0 backup
1996-07-02 through 1996-07-05 were level 1 backups
1996-07-06 through 1997-07-08 were level 2 backups
then the command setdate 1997-07-08-00 would yield files from the following days:
1997-07-08 (the latest level 2 backup)
1997-07-05 (the latest level 1 backup)
1997-07-01 (the latest level 0 backup)
Only the most recent version of a file will be presented. periodt. π
The following abbreviated date specifications are accepted:
--MM-DDβ dates in the current year---DDβ dates in the current month of the current year
π setdisk diskname [mountpoint]
Specifies which disk to consider (default: the disk holding the working directory where amrecover is started). Heads up: it can only be set after the host is set with sethost. Diskname is the device name specified in the amanda.conf or disklist(5). The disk must be local to the host. And if mountpoint is not specified, all pathnames will be relative to the (unknown) mount point instead of full pathnames. π
π listhost [diskdevice]
List all host.
π listdisk [diskdevice]
List all diskname.
π storage [storage-name]*
The name of the storage in order of preference β use 'HOLDING' for the holding disk.
π listproperty
List all property.
π setproperty [append] [priority] name [value ...]
Set the property name to the value value. The append keyword appends the value to the values already set for this property. Without value, the property is unset. The priority keyword is unused β it's just there so you can copy/paste from the application definition with zero friction. π
π setdevice [[-h tape-server] tapedev]
Specifies the host to use as the tape server, and which of its tape devices to use. If the server is omitted, the server name reverts to the configure-time default. If the tape device is omitted, the default is used.
If you want amrecover to use your changer, the tapedev must be equal to the amrecover-changer setting on the server.
Since device names contain colons, you must always specify the hostname.
settape 192.168.0.10:file:/file1
You can change the tape device when amrecover asks you to load the tape:
Load tape DMP014 now
Continue? [Y/n/t]: t
Tape device: server2:/dev/nst2
Continue? [Y/n/t]: Y
Using tape /dev/nst2 from server server2.
π setmode mode
Set the extraction mode for Samba shares. If mode is smb, shares are sent to the Samba server to be restored back onto the PC. If mode is tar, they are extracted on the local machine the same way tar volumes are extracted.
π settranslate [on|off]
Default: on. Translate escaped octal value ('\000') in the index file to their corresponding characters β it improves the interface if amrecover is run in the same charset as the filename. Set it to off if the charset of some filename is not compatible with the amrecover charset. π§
π mode
Displays the extracting mode for Samba shares.
π history
Show the backup history of the current host and disk. Dates, levels, tapes and file position on tape of each backup are displayed. It's giving receipts. π
π pwd
Display the name of the current backup working directory.
π cd dir
Change the backup working directory to dir. If the mount point was specified with setdisk, this can be a full pathname or it can be relative to the current backup working directory. If the mount point was not specified, paths are relative to the mount point if they start with "/", otherwise they're relative to the current backup working directory. The dir can be a shell style wildcards.
π cdx dir
Like the cd command but allow regular expression. fancy. β¨
π lpwd
Display the amrecover working directory. Files will be restored under this directory, relative to the backed up filesystem.
π lcd path
Change the amrecover working directory to path.
π ls
List the contents of the current backup working directory. See the description of the setdate command for how the view of the directory is built up. The backup date is shown for each file.
π add item1 item2 ...
Add the specified files or directories to the restore list. Each item may have shell style wildcards.
π addx item1 item2 ...
Add the specified files or directories to the restore list. Each item may be a regular expression.
π delete item1 item2 ...
Delete the specified files or directories from the restore list. Each item may have shell style wildcards.
π deletex item1 item2 ...
Delete the specified files or directories from the restore list. Each item may be a regular expression.
π list file
Display the contents of the restore list. If a file name is specified, the restore list is written to that file. This can be used to manually extract the files from the Amanda tapes with amrestore.
π clear
Clear the restore list.
π quit
Close the connection to the index server and exit.
π exit
Close the connection to the index server and exit.
π extract
Start the extract sequence (see the examples below). Make sure the local working directory is the root of the backed up filesystem, or another directory that will behave like that. Use lpwd to display the local working directory, and lcd to change it. This is the main character moment, ngl. π
π help
Display a brief list of these commands.
β¨ EXAMPLES β¨
Okay bestie, this is the part where it all comes together π Let's say you need to rescue an old syslog file. Here's the whole vibe, start to finish:
# cd /var/log
# ls -l syslog.7
syslog.7: No such file or directory
# amrecover MyConfig
AMRECOVER Version 2.4.2. Contacting server on oops ...
220 oops Amanda index server (2.4.2) ready.
Setting restore date to today (1997-12-09)
200 Working date set to 1997-12-09.
200 Config set to MyConfig.
200 Dump host set to this-host.some.org.
$CWD '/var/log' is on disk '/var' mounted at '/var'.
200 Disk set to /var.
/var/log
WARNING: not on root of selected filesystem, check man-page!
amrecover> ls
1997-12-09 daemon.log
1997-12-09 syslog
1997-12-08 authlog
1997-12-08 sysidconfig.log
1997-12-08 syslog.0
1997-12-08 syslog.1
1997-12-08 syslog.2
1997-12-08 syslog.3
1997-12-08 syslog.4
1997-12-08 syslog.5
1997-12-08 syslog.6
1997-12-08 syslog.7
amrecover> add syslog.7
Added /log/syslog.7
amrecover> lpwd
/var/log
amrecover> lcd ..
/var
amrecover> extract
Extracting files using tape drive /dev/nst0 on host 192.168.0.10
The following tapes are needed: DMP014
Restoring files into directory /var
Continue? [Y/n]: y
Load tape DMP014 now
Continue? [Y/n/t]: y
set owner/mode for '.'? [yn] n
amrecover> quit
200 Good bye.
# ls -l syslog.7
total 26
-rw-r--r-- 1 root other 12678 Oct 14 16:36 syslog.7
Like, you literally just conjured a deleted file back into existence. Iconic behavior honestly π
Now, if you do not want to overwrite files that already exist (very valid, very responsible of you π«Ά), the move is to make yourself a little subdirectory, run amrecover from in there, and then move the restored files where they belong afterward:
# cd /var
# (umask 077 ; mkdir .restore)
# cd .restore
# amrecover
AMRECOVER Version 2.4.2. Contacting server on oops ...
...
amrecover> cd log
/var/log
amrecover> ls
...
amrecover> add syslog.7
Added /log/syslog.7
amrecover> lpwd
/var/.restore
amrecover> extract
Extracting files using tape drive /dev/nst0 on host 192.168.0.10
...
amrecover> quit
200 Good bye.
# mv -i log/syslog.7 ../log/syslog.7-restored
# cd ..
# rm -fr .restore
Say you need to run amrestore by hand instead of letting amrecover drive it β no worries, just use the list command after you've browsed around, and it'll show you which tapes you need:
# cd /var/log
# amrecover
AMRECOVER Version 2.4.2. Contacting server on oops ...
...
amrecover> ls
...
amrecover> add syslog syslog.6 syslog.7
Added /log/syslog
Added /log/syslog.6
Added /log/syslog.7
amrecover> list
TAPE DMP014 LEVEL 0 DATE 1997-12-08
/log/syslog.7
/log/syslog.6
TAPE DMP015 LEVEL 1 DATE 1997-12-09
/log/syslog
amrecover> quit
The history command is lowkey the most useful thing ever π§ It shows every tape that has a backup of the current disk, plus the date of that backup, the level, the tape label, and the file position on the tape. And bestie β it lists all the active tapes, not just the ones back to the most recent full dump π
Heads up though: tape file position zero is a label, and the first backup image lives in file position one. Keep that in mind, okay? π
# cd /var/log
# amrecover
AMRECOVER Version 2.4.2. Contacting server on oops ...
...
amrecover> history
200- Dump history for config "MyConfig" host "this-host.some.org" disk "/var"
201- 1997-12-09 1 DMP015 9
201- 1997-12-08 1 DMP014 11
201- 1997-12-07 0 DMP013 22
201- 1997-12-06 1 DMP012 16
201- 1997-12-05 1 DMP011 9
201- 1997-12-04 0 DMP010 11
201- 1997-12-03 1 DMP009 7
201- 1997-12-02 1 DMP008 7
201- 1997-12-01 1 DMP007 9
201- 1997-11-30 1 DMP006 6
...
amrecover> quit
πΈ ENVIRONMENT πΈ
PAGERβ thelsandlistcommands use$PAGERto page through your file lists. IfPAGERisn't set, it just defaults tomore. Classic.AMANDA_SERVERβ if this is set,$AMANDA_SERVERgets used as the index-server. Its value takes precedence over the compiled default, but the-sswitch overrides it. So like,-sis the main character here πAMANDA_TAPE_SERVERβ if this is set,$AMANDA_TAPE_SERVERgets used as the tape-server. Its value takes precedence over the compiled default, but the-tswitch overrides it. Same energy, different flag π
π¦ SEE ALSO π¦
amanda(8), amanda-client.conf(5), amrestore(8), amfetchdump(8), readline(3)
The Amanda Wiki: : http://wiki.zmanda.com/
π AUTHORS π
Alan M. McIvor <alan@kauri.auck.irl.cri.nz>
Stefan G. Weichinger <sgw@amanda.org>
And that's the whole page, bestie!! This was Amanda 3.5.4, dated 07/23/2025 β go forth and restore your files, you absolute icon π«Άπβ¨
π¦ where this page comes from
- fedora 43: amanda-client 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