Re: Amanda tapeless configuration (long)


Subject: Re: Amanda tapeless configuration (long)
From: Jon Reynolds (jonr@ninestar.com)
Date: Tue Dec 17 2002 - 13:33:41 AKST


This is exactly what I wanted to do with amanda!! Thanks Mike!

Jon

On Tue, 2002-12-17 at 12:10, Mike Barsalou wrote:
> I am not sure if you have to do the tapeio part of this to make this work.
> I haven't tested this stuff myself
>
> I found this in google but didn't want to send the huge link:
>
> All messages from thread
>
> Message 1 in thread
> From: Clinton Hogge
> </groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=author:clint%40western.net+>
> (clint@western.net <mailto:clint%40western.net>) Subject: Tapeless Amanda
> Configuration
>
>
> View this article only
> </groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=v03110700b82b28c5c366%40%5B129.37.
> 168.238%5D>
> Newsgroups: list.amanda.users
> </groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&group=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.
>
>
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.

-- 
Jon Reynolds <jonr@ninestar.com>
Nine Star Enterprises

--------- To unsubscribe, send email to <aklug-request@aklug.org> with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Tue Dec 17 2002 - 14:50:16 AKST