Amanda File Recovery 24.04LTS: Difference between revisions

From ScottWiki
Jump to navigation Jump to search
(Created page with "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-cl...")
 
(No difference)

Latest revision as of 23:39, 12 March 2024

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:

index_server "localhost"
tapedev "changer"
auth "local"

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):

mkdir /tmp/test-recovery
cd /tmp/test-recovery

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 solaris_bs1

You should sget this

Using index server from environment AMANDA_SERVER (knuth)
AMRECOVER Version 3.2.1. Contacting server on knuth ...
220 knuth AMANDA index server (3.2.1) ready.
Setting restore date to today (2011-01-01)
200 Working date set to 2011-01-01.
200 Config set to MyConfig.
501 Host knuth is not in your disklist.
Use the sethost command to choose a host to recover
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.

amrecover> sethost localhost

With this result

200 Dump host set to localhost.

and let's narrow in and recover the latest backup of 'groups':

amrecover> setdisk /etc
200 Disk set to /etc.
amrecover> add * (this will add all subdirctories)

Then lets extract it out

amrecover> extract
Extracting files using tape drive changer on host knuth.
The following tapes are needed: MyData01
Extracting files using tape drive changer on host knuth.
Load tape MyData01 now
Continue [?/Y/n/s/d]? Y
Restoring files into directory /root
All existing files in /root can be deleted
Continue [?/Y/n]? Y
Hit control-d to exit amrecover, and there's your file:

That's nice and easy, isn't it?