John and Clinton,

Thanks for your help.  My problem was that I didn't create the "data" 
directories inside each of the "tape" directories.  Everything is up and 
running now.  Hopefully with a little more testing I'll be able to put 
the system into production.

In order to contribute something back I wrote up a little "cooksheet" of 
how to get tapeless backups setup with and Amanda and using the 
chg-multi tapechanger.  I've attached the file to this message.  I hope 
it is of some use to you.  John, it might be good if you read it over to 
make sure it is accurate.  You can do what you like with it.

Thanks a lot.
Alex.

John R. Jackson wrote:

>>...  I'd also like to get it setup to use the automatic tape 
>>changer to automatically change "tapes" ...
>>
>
>I do what you're trying to do when I'm testing, so it is possible.
>
>Clinton's comment about "statefile" being required is also true, although
>I think the script would have failed much sooner if you really didn't
>have that.
>
>>...  It seems that the mt 
>>program doesn't work properly with the file:/path tapedev as I keep on 
>>getting input/output errors when the program is called to do things like 
>>rewind the tape.  ...
>>
>
>EIO is usually returned when you try to do something and the "drive"
>is not "online".  Check this with "ammt -f file:/... status".  In the
>case of the "file:" driver, and in your particular case, this probably
>means you don't have the "/backup/amanda/tapes/t1/data" (and t2, t3,
>t4) directories set up.  Maybe you only set up the tX area and not the
>"data" subdirectory?
>
>Another possibility is that there are permissions problems.  Make sure
>you run all Amanda things as your Amanda user and that it has complete
>access to the "tapes".
>
>>needeject 0
>>
>
>FYI, I set this to "1" for my testing.
>
>>Alex.
>>
>
>John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]
>


Amanda backups to Hard drive (tapeless backups)
-----------------------------------------------

# Copyright 2001.  Alex Muc [EMAIL PROTECTED]
# Permission is granted to freely copy this article provided the copyright 
# notice and this notice remain with it.
# 2001.09.16

How to configure tapeless backups and the chg-multi tape changer to do network backups 
on your system.

Assumptions
-----------
a) Redhat Linux 7.1
b) Our backup configuration is called "Daily"
c) These instructions describe deviations from the normal setup, NOT the 
complete setup instructions for Amanda.  The regular Amanda documentation
(mailing list, faq, on-line book instructions) should be consulted for 
the normal setup.

Instructions
------------

1) As of the time of writing you need the branch of amanda only available from the 
sourceforge cvs.
Run the following commands in the directory where you want the cvs source downloaded 
to:
#  cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot/amanda login
#  cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot/amanda checkout -r 
amanda-242-tapeio amanda

2) As root, run the autogen script TWICE in the directory where amanda was downloaded 
to
#  ./autogen
#  ./autogen

3) Create the amanda user.  Create the amanda group, if necessary.

4) Run configure on amanda with the user and group of the previous step.
#  ./configure --with-user=amanda --with-group=amanda

5) Create an Amanda config under /usr/local/etc/amanda
#  mkdir /usr/local/etc/amanda/Daily

6) Copy the sample amanda.conf file from the examples directory of the distribution

7) Edit the amanda.conf file.  You'll have to decide on the backup scheme.  The 
necessary changes for our
setup are:
#  tpchanger "chg-multi"
#  changerfile "/usr/local/etc/amanda/Daily/chg-multi.conf"
You can comment out the tapedev and changerdev parameters

8) Create your tape type configuration in amanda.conf.  My setup is the following:
#  tapetype HARD-DISK
#  define tapetype HARD-DISK {
#     comment "20GB Hard disk"
#     length 20000 mbytes
#  }

9) Modify the chg-multi.conf file.  My conf file has the following options
#  multieject 0
#  gravity 0
#  needeject 0
#  ejectdelay 0
#  statefile /usr/local/etc/amanda/Daily/multi-changer-status
#  firstslot 1
#  lastslot 4
#  slot 1 file:/backup/amanda/tapes/t1
#  slot 2 file:/backup/amanda/tapes/t2
#  slot 3 file:/backup/amanda/tapes/t3
#  slot 4 file:/backup/amanda/tapes/t4
You'll need to specify the path to the statefile to match your setup.  You'll also 
need to modify slot directories to match your setup.  These directories are where the 
"tapes" that Amanda uses will be (this is where the backup data is stored).

10) Create the "tapes".  In our case this is just a directory structure to be used 
instead of tapes.  You need one directory for each "slot" you defined in the 
chg-multi.conf.  Each directory needs to have write access for the amanda user and 
group.  Each directory also needs to contain a "data" directory.  The "data" directory 
is where the actual backup data is stored.  This directory also needs write access by 
the amanda user

11) Label the tapes.  To do this you need to cycle through the "tapes" (really just 
the directories you created in the previous step) with the chg-multi program.  Run the 
following commands
#   $/usr/local/libexec/chg-multi -slot advance
#   $amlabel Daily101 slot 1
The first command selects the first tape.  The second command does the labelling.  
Increment the slot number of the amlabel command for each tape.

12) Check your permissions.  The amanda user and group need write access to all the 
tape directories.  Amanda
will also need access to the disk devices for whatever it is backing-up.

14) Test it out.  The following commands should return reasonable results (ie. no 
errors):
#   $/usr/local/libexec/chg-multi -info
#   1 4 1
#   $/usr/local/libexec/chg-multi -slot current
#   1 file:/backup/amanda/tapes/t1
#   $amcheck Daily
#   Amanda Tape Server Host Check 
#   -----------------------------                                                   
#   Holding disk   /backup/amanda/holding: 18655980 KB disk space available, that's
#   plenty
#   amcheck-server: slot 1: date X        label DonleaSet101 (exact label match)
#   NOTE: skipping tape-writable test                                               
#   Tape DonleaSet101 label ok   
#   ...

15) Now you need to configure the disklists and clients.  The above instructions 
should get you setup with a tapeless, auto-changing, hard-drive backup system using 
Amanda.


Other Notes
-----------
1) If you want to backup a machine which has a firewall on it the read the Amanda 
FAQ-O-MATIC/Miscellaneous/"Amanda from behind a firewall" question.  
Do what it says and save yourself hours of grief.

Reply via email to