AMANDA FAQ
(Answer) (Category) Amanda Faq-O-Matic : (Category) Configuration :
How to configure for tapeless operation?
I just find this on google news:
----------------------------------------------------------------------------
From: Clinton Hogge (clint@western.net)
Subject: Tapeless Amanda Configuration
This is the only article in this thread
View: Original Format
Newsgroups: list.amanda.users
Date: 2001-11-28 17:07:21 PST

Hello,

Per a recent request, this is my own little HOWTO on how to set up Amanda
to backup using a hard disk instead of tape. I tried to post this to the
FOM at http://amanda.sourceforge.net/fom-serve/cache/191.html but I
received a permission denied error when I tried to create a new login. So
I'm posting it here. In addition to installation, I added a section on
recovering with amrecover.

Thanks especially to John R. Jackson for helping me set this up. Also, as
noted recently, there's also a nice summary by Alex Muc at
http://www.mail-archive.com/amanda-users@amanda.org/msg07758.html.

Regards,

Clinton Hogge
Industrial Images


Backing up to hard disk instead of tape
---------------------------------------
Assumes that:
Config files are in /etc/amanda
Configuration named "DailySet1"
Local state directory is /var/lib/amanda
Amanda is configured --with-user=amanda --with-group=disk
14 day dump cycle with an unattended "rotation" of the "tapes"
For the backup device I use a separate 4 gig hard drive mounted at /var2

Installation
------------
1. Obtain the tapeio source from sourceforge:

$cvs -d:pserver:anonymous@cvs.amanda.sourceforge.net:/cvsroot/amanda login
$cvs -z3 -d:pserver:anonymous@cvs.amanda.sourceforge.net:/cvsroot/amanda
checkout -r amanda-242-tapeio amanda
$cd amanda
$./autogen

2. Install Amanda as usual.

3. Edit the following config files (all mode 644, owner amanda, group disk):

---------------------------------
/etc/amanda/DailySet1/amanda.conf
---------------------------------
# These are the options that differ from examples/amanda.conf

dumpcycle 14 days
tapecycle 14
#runspercycle  # defaults to 1 per day

runtapes 1
tpchanger "chg-multi"
changerfile "/etc/amanda/DailySet1/changer.conf"
# Comment out tapedev and changerdev

tapetype HARD-DISK
labelstr "^DailySet1[0-9][0-9]*$"

define tapetype HARD-DISK {
    comment "Hard disk instead of tape"
    length 4000 mbytes  # Simulates end of tape on hard disk (a 4 GB disk here)
}

define dumptype hard-disk-dump {
    global
    comment "Back up to hard disk instead of tape - using dump"
    holdingdisk no
    index yes
    priority high
}

define dumptype hard-disk-tar {
    hard-disk-dump
    comment "Back up to hard disk instead of tape - using tar"
    program "GNUTAR"
}

----------------------------------
/etc/amanda/DailySet1/changer.conf
----------------------------------
multieject 0
gravity 0
needeject 0
ejectdelay 0

statefile /var/lib/amanda/DailySet1/changer-status

firstslot 1
lastslot 14

slot 1 file:/var2/amandadumps/tape01
slot 2 file:/var2/amandadumps/tape02
slot 3 file:/var2/amandadumps/tape03
slot 4 file:/var2/amandadumps/tape04
slot 5 file:/var2/amandadumps/tape05
slot 6 file:/var2/amandadumps/tape06
slot 7 file:/var2/amandadumps/tape07
slot 8 file:/var2/amandadumps/tape08
slot 9 file:/var2/amandadumps/tape09
slot 10 file:/var2/amandadumps/tape10
slot 11 file:/var2/amandadumps/tape11
slot 12 file:/var2/amandadumps/tape12
slot 13 file:/var2/amandadumps/tape13
slot 14 file:/var2/amandadumps/tape14

------------------------------
/etc/amanda/DailySet1/disklist
------------------------------
# hostname diskdev dumptype
# Replace "dumptype" with either "hard-disk-dump" or "hard-disk-tar"
# localhost /home hard-disk-dump
# localhost /etc hard-disk-tar

------------------------------

4. Create the "tapes" on the tape server hard drive with the associated
data directories:

$mkdir /var2/amandadumps
$mkdir /var2/amandadumps/tape01
$mkdir /var2/amandadumps/tape01/data
...
$mkdir /var2/amandadumps/tape14
$mkdir /var2/amandadumps/tape14/data

$chown -R amanda.disk /var2/amandadumps
$chmod -R 770 /var2/amandadumps

5. Use amlabel to label the tapes:

$amlabel DailySet1 DailySet101 slot 1
...
$amlabel DailySet1 DailySet114 slot 14


Recovery with amrecover
-----------------------
As root on the tape server:

$mkdir /tmp/restore
$cd /tmp/restore
$amrecover DailySet1
$setdate (Optional)
$sethost foo
$setdisk bar
$cd dir/which/contains/filetorecover
$add filetorecover
$list (note which "tape" the file is on)
$settape host:file:/var2/amandadumps/tapeXX

In this step, replace the appropriate host and tape values. For example to
extract a file from host "rustler" that's on tape 12:

$settape rustler:file:/var2/amandadumps/tape12

$extract
$quit

The only gotcha with amrecover is that if the files you want to extract are
on different tapes, you need to add only the files that are on tape01,
settape for tape01, extract, add files for tape02, settape tape02, extract,
etc. As a work-around, you can give amrecover a "fake" name (/tmp/whatever)
with the "-d" option and then symlink that to the appropriate "tape" as it
asks for it.
yes0d@yahoo.fr
The above guide is pretty good, with just a few observations:

1. Amanda 2.4.3 includes tapeio, so you don't need to check out from CVS. And
for example, for Linux, RPMs of 2.4.3 now exist on vendors sites.

2. The example above includes "length 4000 mbytes" in the HARD-DISK tapetype for
a 4Gb disk. But actually this is the size of a single tape, so you should choose
a "length" corresponding to the amount of free disk space dedicated to backups
divided by tapecycle.
jifl-amanda@jifvik.org
Also, starting with 2.4.3, look under "OUTPUT DRIVERS" at the "file" option in the "man amanda" documentation. That's supposed to be a "complete" solution, although I haven't tried it myself. It looks to be simpler than what's described above, if it works.
mark@summersault.com
In addition to the how-to (which is pretty good IMHO):
I haven't tried, but think, that it would work fine, if you specify a tape in a following manner:
$settape host:file/var2/amandadumps/tape-in-use
and when a tape is required by amrecover (it informs the operator to insert a next tape), you just do a symbolic link:
$ln -s /var2/amandadumps/tape-required /var2/amandadumps/tape-in-use
(where tape-required is one of the 14 tapes, e.g. tape12)
and when next tape is expected, you remove the link and create a new one. I think this will allow to extract all files at once, even if the bunch spans multiple tapes.
Laas Toom
laas@haldjas.folklore.ee
How do we configure the statefile?
wab@purdue.edu
As of Amanda version 2.4.4p3 (and perhaps earlier) there is a substantially easier way to handle amrecover for tapeless setups. Add the line
amrecover_changer "chg-multi"
to amanda.conf. Then, in amrecover, issue the command
settape chg-multi
before extraction. This will automatically switch "tapes" for you.
stephen.walton@csun.edu
I have a server on the DMZ that backs up itself to a secondary hard disk. I currently have a bogus tapedev definition and set "reserver 50" to make it backup to the holding disk. It seems to be working well, but I get error messages complaining about no tape.
What is the "proper" way to set this up?
tom.griffing@vistyx.com
I'm also looking for a solution to configure amanda for a tapeless operation. I would like to use tapes for daily and weekly standard backups and tapeless mode for non-regular backups.
brigitte.maerkl@bauhaus-ag.de
I'd like to know how to use amanda tapeless / in the harddisk-mode too. Please keep me up 2 date: gstammw@gmx.net
gstammw@gmx.net
I need it too! Please post the answer here or drop me an e-mail. Tks!
stack@aeiou.pt
I'm insterested in trying to use a ZIP disk as a "tape" device. Can Amanda backup to block devices?
sean@fredcom.com
I have tryed to run autogen on Debian and had to go through a lot of errors in acinclude.m4 and configure.in.
1) this is regarding: acinclude.m4 - all the names for AC_DEFUN need to be encloused with []. HERE IS OUTPUT:
aclocal --helpacinclude.m4:2: warning: underquoted definition of AMANDA_C_UNSIGNED_LONG_CONSTANTS
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
acinclude.m4:26: warning: underquoted definition of AMANDA_FUNC_SHM_ARG_TYPE acinclude.m4:74: warning: underquoted definition of AMANDA_FUNC_SELECT_ARG_TYPE ....... truncated ......... acinclude.m4:865: warning: underquoted definition of AM_PROG_NM configure.in:1696: /usr/bin/m4: Warning: Excess arguments to built-in `m4_if' ignored autom4te: /usr/bin/m4 failed with exit status: 1 aclocal: autom4te failed with exit status: 1 autoreconf: aclocal failed with exit status: 1
2) Next error in configure.in because of unmatched ")]":
aclocal --helpconfigure.in:1696: /usr/bin/m4: Warning: Excess arguments to built-in `m4_if' ignored autom4te: /usr/bin/m4 failed with exit status: 1 aclocal: autom4te failed with exit status: 1 autoreconf: aclocal failed with exit status: 1
3) and lastly:
configure.in:2127: error: do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
For fix please reffer to URL: http://docs.biostat.wustl.edu/cgi-bin/info2html?(autoconf.info.gz)AC_LIBOBJ%2520vs%2520LIBOBJS
 

igorg@manaproducts.com
[Append to This Answer]
Previous: (Answer) SSL: Error when backing up NT share?
Next: (Answer) Solaris: Permission denied errors
This document is: http://amanda.sourceforge.net/cgi-bin/fom?file=191
[Search] [Appearance]
This is a Faq-O-Matic 2.709.
This FAQ administered by the Amanda Team