Recovering Files
Configuration
We'll be using amrecover(8) to recover files from backup. Before we can recover files, a little more configuration is in order. Amrecover is technically a client tool, and contacts the server to "pull" the recovery down to the client. You'll recall this is the reverse of the backup situation, where the server contacts the client to ask for its data. As such, we'll need to configure the client to talk to the server. Put the following in /etc/amanda/amanda-client.conf:
There, that wasn't so bad.
Start the Recovery
Amrecover will recover into subdirectories of the current directory. It's good form to run amrecover in an empty directory, so (as root):
amrecover runs as root, since it's restoring files and permissions - something a non-root user can't do. It's time to start amrecover:
Amrecover tries to be useful and guess the hostname you want to restore. We used "localhost" instead of "knuth", so this guess didn't work out. That's OK, though! You just need to tell amrecover what host to use.
and let's narrow in and recover the latest backup of 'groups':
and extract the file
Hit control-d to exit amrecover, and there's your file:
That's nice and easy, isn't it?
Although amrecover was designed for use by users, most Amanda admins only run amrecover on the Amanda server, and then transfer the recovered files into place using some other mechanism like scp or rsync.
For More Info
Have a look at How To:Recover Data for the basic guide to amrecover.
Last updated