Disk Based Backups With Amanda On Debian Etch - Page 2

4 Needed Packages On the Backup-Client

sudo apt-get install amanda-client xinetd openssh-server

 

5 Amandahosts On The Backup-Client

Add the backup-host to the amandahosts file.

sudo vi /etc/amandahosts
server1.example.com backup

Note: Don't forget to add the backup-host to /etc/hosts if you are using this setup in a LAN without an own DNS.

 

6 Scheduled Backups

Modify the existing crontab (crontab.amanda) in /etc/amanda on the backup-host to your needs.

 

7 Testing The Configuration On The Backup Host

/usr/sbin/amcheck DailySet1

should look like:

Amanda Tape Server Host Check
-----------------------------
Holding disk /dumps/amanda: 25063520 KB disk space available, using 24961120 KB
slot 1: read label `DailySet1-1', date `20070911'
NOTE: skipping tape-writable test
Tape DailySet1-1 label ok
Server check took 0.254 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.354 seconds, 0 problems found
(brought to you by Amanda 2.5.1p1)

 

8 Manual Backup

For testing purposes or special reasons you can make a backup manually of course:

/usr/sbin/amdump DailySet1

Note: Depending on the size of the data this could take a while.

 

9 Restore Backups

Switch to a directory on the backup-host where you (temporarily) want to restore the backup file(s):

cd /tmp/

 

9.1 Select The Virtual Tape

Insert the virtual tape from which you want to restore the backup(s):

/usr/sbin/amtape $configuration slot $x

e.g.

/usr/sbin/amtape DailySet1 slot 1

 

9.2 Rewind The Virtual Tape

No joke, you have to rewind your HD. :)

/usr/sbin/ammt -t file:/dumps/amandatapes/$configuration rewind

e.g.

/usr/sbin/ammt -t file:/dumps/amandatapes/DailySet1 rewind

 

9.3 Restore Backup(s) From The Virtual Tape

To get all backups from the tape:

/usr/sbin/amrestore file:/dumps/amandatapes/$configuration

e.g.

/usr/sbin/amrestore file:/dumps/amandatapes/DailySet1

To get a single backup from the tape:

/usr/sbin/amrestore file:/dumps/amandatapes/$configuration $host $backed_path_or_device

e.g.

/usr/sbin/amrestore file:/dumps/amandatapes/DailySet1 server2.example.com '/home$'

or

/usr/sbin/amrestore file:/dumps/amandatapes/DailySet1 server2.example.com sda1

 

9.4 Transfer The Backup-File To The Client Host

I chose scp for this.

scp -C $backup_file $user@$backup-client:$destination_file

e.g.

scp -C server2.example.com._home.20070911.0 [email protected]:/tmp/backup

 

9.5 Uncompress The Transfered Backup On The Client-Host

cd /tmp/
sudo tar xvf backup

 

Share this page:

1 Comment(s)