Anyone have a .conf for using the new tapeless backup techniques
introduced in 2.4.3? I too am stuck; my best guess is this:

There are 2 ways to do tapeless backup: 
(a) The 2.4.2 and below way (just uses holding disk) 
(b) the 2.4.3 way (if anyone has this working please post your .conf!) 
(no holding disk needed I guess; uses new file driver, somehow) 

Way (a) seems to be well described, and oughta works with 2.4.3 and up 
The FAQ http://amanda.sourceforge.net/cgi-bin/fom? 
_highlightWords=tapeless&file=191 states... 

...I've set up a system using 2.4.2p2 to backup to nfs mounted drive 
space just recently. If you are able to use 2.4.3, there is a 
setting to save to disk. Check the docs or the mail archives... 

I have checked the docs and the mail archives and have had no joy. 
I'd would love to use the whiz-bang new 2.4.3 technique but 
despite the optimistic language in the FAQ, the docs and the mail 
archives do not adequately describe technique (b). Following are 
2 long posts. The first is the somewhat sparse documentation in 
the 2.4.3 docs. It may soon be time to give up on (b) and surrender 
to the adequately documented (a) technique. People won't use new
features if they are not documented enough. The second long posting 
details one man's use of technique (a). 

We should all stop confusing the 2 different tapeless approaches. 
And if anyone is successfully using the new 2.4.3 (b) technique, 
could you post your .conf file? The helpful descriptions of the (a) 
technique are masking the need for fuller documentation of the (b) 
technique. I tried something like Mohamed in his earlier post with
the same bad results.

-Steve 


New in 2.4.3 man page... but hard to grok... can't make it work
(See Mohamed's posting)...

OUTPUT DRIVERS 
       The  normal value for the tapedev parameter, or for what a 
       tape changer returns, is a full path name to a non-rewind- 
       ing  tape  device,  such  as  /dev/nst0 or /dev/rmt/0mn or 
       /dev/nst0.1 or whatever conventions the  operating  system 
       uses.    Amanda   provides  additional  application  level 
       drivers that support non-tradition  tape  simulatation  or 
       features.  To access a specific output driver, set tapedev 
       (or configure your changer to return) a string of the form 
       driver:driver-info  where  driver  is one of the supported 
       drivers and driver-info is optional additional information 
       needed by the driver. 
  
       The supported drivers are: 
  
       tape      This  is the default driver.  The driver-info is 
                 the tape device name.  Entering /dev/rmt/0mn  is 
                 really a short hand for tape:/dev/rmt/0mn. 
  
       null      This  driver  throws away anything written to it 
                 and returns EOF for any reads except  a  special 
                 case  is made for reading a label, in which case 
                 a "fake" value is returned  that  Amanda  checks 
                 for  and  allows  through regardless of what you 
                 have set in labelstr.  The driver-info field  is 
                 not used and may be left blank: 
  
                        tapedev "null:" 
  
                 The length value from the associated tapetype is 
                 used to limit the amount of data written.   When 
                 the  limit  is reached, the driver will simulate 
                 end of tape. 
  
                 NOTE: this driver should only be used for debug- 
                 ging  and  testing,  and  probably only with the 
                 record option set to no. 
  
       rait      Redundant  Array  of  Inexpensive  (?)    Tapes. 
                 Reads  and  writes  tapes  mounted  on  multiple 
                 drives by spreading the data across  N-1  drives 
                 and  using  the  last drive for a checksum.  See 
                 docs/RAIT for more information. 
  
                 The driver-info field describes the  devices  to 
                 use.   Curly  braces  indicate multiple replace- 
                 ments in the string.  For instance: 
  
                        tapedev "rait:/dev/rmt/tps0d{4,5,6}n" 
  
                 would use the following devices: 
  
                        /dev/rmt/tps0d4n 
                        /dev/rmt/tps0d5n 
                        /dev/rmt/tps0d6n 
  
       file      This driver emulates a tape device with a set of 
                 files  in  a  directory.   The driver-info field 
                 must be the name of an existing directory.   The 
                 driver  will  test  for  a  subdirectory of that 
                 named data and return offline until it  is  pre- 
                 sent.   When  present, the driver uses two files 
                 in the data subdirectory  for  each  tape  file. 
                 One  contains  the  actual data.  The other con- 
                 tains record length information. 
  
                 The driver uses a file named status in the  file 
                 device  directory to hold driver status informa- 
                 tion, such as tape position.   If  not  present, 
                 the  driver  will create it as though the device 
                 is rewound. 
  
                 The length value from the associated tapetype is 
                 used  to limit the amount of data written.  When 
                 the limit is reached, the driver  will  simulate 
                 end of tape. 
  
                 One  way  to  use this driver with a real device 
                 such as a CD is to create a  directory  for  the 
                 file  device  and  one or more other directories 
                 for the actual data.   Create  a  symlink  named 
                 data  in  the  file directory to one of the data 
                 directories.  Set the tapetype length  to  what- 
                 ever the medium will hold. 
  
                 When  Amanda  fills  the file device, remove the 
                 symlink and (optionally) create a new symlink to 
                 another  data  area.   Use  a CD writer software 
                 package to burn the image from  the  first  data 
                 area. 
  
                 To  read  the  CD,  mount it and create the data 
                 symlink in the file device directory. 





Clear Documentation of the old school (a) technique:


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:[EMAIL PROTECTED]:/cvsroot/amanda 
login 
$cvs -z3 - 
d:pserver:[EMAIL PROTECTED]:/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. 


Reply via email to