Re: ftp to central tape library instead of local tape?

2002-03-13 Thread Jon Stearley

 But I'm interested -- let us know what you come up with.  And, FWIW, I 

been running successfully since 3/2 so here's a little doc on what i
did.  all i've got to do now is craft a bootable cdr with
reiserfs,kerberos,ssh,ftp,amanda support and i'll be
bare-metal-golden.  i'll wait a little on that though, i've itched my
backup itch enough for now.

thanks for all the help!

-- 
+--+
| Jon Stearley  (505) 845-7571  (FAX 844-2067) |
| Compaq Federal LLCHigh Performance Solutions |
| Sandia National Laboratories  Scalable Systems Integration   |
+--+



Situation:
 1. I have a computer I'd like to backup
 2. I love and trust amanda for backups
 3. I can ftp stuff into a huge robotic tape library I don't have to
babysit or maintain

So here's what I did (with snappy help from the amanda-users list):
 1. grabbed, built, and installed amanda-2.4.3b2
 2. carved out a chunk of disk for amanda tmp space
(mounted at /scratch/amanda)
 3. setup amanda.conf, here's some key settings:
   dumpcycle 5 weeks
   runspercycle 25
   tapecycle 30 tapes
   tpchanger chg-multi
   changerfile /scratch/amanda/etc/chg-multi.conf
   tapetype FILE
   logdir   /scratch/amanda/var
   indexdir /scratch/amanda/var/index
   infofile /scratch/amanda/var/curinfo
   define tapetype FILE {
   length 1900 mbytes  # 2G filesize limit on my linux kernel
   }
   define dumptype ex-tar {
   index yes
   record yes
   holdingdisk no
   program GNUTAR  # reiserfs is wonderful!!!
   compress client fast
   exclude ./tmp
}
 4. setup chg-multi.conf like:
multieject 0
gravity 0
needeject 0
ejectdelay 0
statefile /scratch/amanda/data/changer-state
firstslot 0
lastslot 29
slot 0 file:/scratch/amanda/data/0
slot 1 file:/scratch/amanda/data/1
slot 2 file:/scratch/amanda/data/2
slot 3 file:/scratch/amanda/data/3
(so on and so forth for rest of slots)
 5. setup my disklist file, 
added amanda lines to /etc/{services,inetd.conf} and HUP'd inetd 
 6. setup my tape drives (from a bash shell):
cd /scratch/amanda/data
i=0
while ((i30));do
mkdir -p $i/data# install a drive and load a tape
let i+=1
done
amtape mercy reset
while ((i30));do
amlabel mercy mercy$i   # label the tape
amtape mercy slot next  # autoload the next tape
let i+=1
done
(of course, all of /scratch/amanda is writeable by my backup
pseudouser)
 7. wrote a bitty script to ftp stuff into the robot
#!/bin/sh
FTPCOMMANDS=/tmp/ftpcommands.$$
echo$FTPCOMMANDS
echo cd amanda  $FTPCOMMANDS
for i in `find . -type d`; do
echo mkdir $i  $FTPCOMMANDS; 
done
for i in `find . -type f -newer /scratch/amanda/data/changer-state`;
do 
echo put $i  $FTPCOMMANDS; 
done
echo quit  $FTPCOMMANDS
# run rgy_edit on angara to produce the .keytab file
#kta -a jrstear -p kerb_passwd_here -f .keytab
kinit -k -t .keytab jrstear
ftp rsmss  $FTPCOMMANDS
kdestroy
 8. setup my backup cronjob like:
1 0 * * 2-6 cd /scratch/amanda; \
/usr/local/pkg/amanda/current/sbin/amtape mercy slot next; \
/usr/local/pkg/amanda/current/sbin/amdump mercy; ./ftpit
 9. put a tar copy of /usr/local/pkg/amanda in /amanda/scratch for
recovery bootstrap starters

sometime i'll craft a bootable cd with the ability to retrieve
/scratch/amanda from the tape archives and run amanda, but i've
scratched my backup itch for now...



Re: ftp to central tape library instead of local tape?

2002-03-01 Thread Jon Stearley

On Thu, Feb 28, 2002 at 07:56:24AM -0500, Joshua Baker-LePain wrote:
 On Wed, 27 Feb 2002 at 5:21pm, Jon Stearley wrote
 
  On Wed, Feb 27, 2002 at 12:05:10PM -0500, Joshua Baker-LePain wrote:
   Well, 243b2 (derived from the 242-tapeio branch) has the ability to 
   use files on disk like tapes  You could back up to files on disk, and 
   then have the cronjob which runs 'amdump' ftp those to the tape library  
   amrecover would still have access to your indexes, and when it asks you 
   for a tape you just grab the right file off the ftp server/tape library
  
  sounds perfect!  so i grabbed and built 243b2 but would appreciate a
  pointer on how to utilize this functionality, the (conf?) option is
  not jumping out at me  thx!
  
 All is explained in amanda(8)  Basically, your tapedev would look like 
 file:/path/to/backup/dir

works, of course ;)  i can amlabel a tape and dump to it  after my
amlabel command, i see the following in the data dir: 
0-mercy00  0mercy00  1-TAPEEND  1TAPEEND

from the docs it sounds like the data dir can contain multiple tapes,
that's the part i can't figgure out  if i amlabel a new label, it
just changes the label on the same image files  i tried using
chg-multi with slots set like:
  slot 0 /scratch/amanda/images/data/0mercy00
  slot 1 /scratch/amanda/images/data/1-mercy01
  slot 2 /scratch/amanda/images/data
  slot 3 /scratch/amanda/images
none of which work  it never thinks it has a tape loaded

so i tried ammt and got:
 backup@mercy: ammt -d -f /scratch/amanda/images/data/0mercy00 status
 debug mode!
 syntax: eof  - e
 syntax: weof - w
 syntax: fsf  - f
 syntax: asf  - a
 syntax: bsf  - b
 syntax: rewind   - rewi
 syntax: offline  - o
 syntax: rewoffl  - rewo
 syntax: status   - s
 tapename is /scratch/amanda/images/data/0mercy00
 calling tape_open(/scratch/amanda/images/data/0mercy00,0)
 processing status(1)
 calling tapefd_status()
 /scratch/amanda/images/data/0mercy00 status failed: Inappropriate
 ioctl for device
same if i try the other things i listed as slots above  looks like
file_tape_status is flunking out?

i already browsed tapeioc, output-filec, and ammtc a bit, but no
revelations  any more hints on howto setup multiple (file) tapes,
ideally controlled as an autoloader?  i'm running debian-testing with
a 2413 kernel  thanks much!

-jon




Re: ftp to central tape library instead of local tape?

2002-03-01 Thread Jean-Louis Martineau

On Fri, Mar 01, 2002 at 11:27:04AM -0700, Jon Stearley wrote:
 On Thu, Feb 28, 2002 at 07:56:24AM -0500, Joshua Baker-LePain wrote:
  On Wed, 27 Feb 2002 at 5:21pm, Jon Stearley wrote
  
   On Wed, Feb 27, 2002 at 12:05:10PM -0500, Joshua Baker-LePain wrote:
Well, 2.4.3b2 (derived from the 2.4.2-tapeio branch) has the ability to 
use files on disk like tapes.  You could back up to files on disk, and 
then have the cronjob which runs 'amdump' ftp those to the tape library.  
amrecover would still have access to your indexes, and when it asks you 
for a tape you just grab the right file off the ftp server/tape library.
   
   sounds perfect!  so i grabbed and built 2.4.3b2 but would appreciate a
   pointer on how to utilize this functionality, the (.conf?) option is
   not jumping out at me...  thx!
   
  All is explained in amanda(8).  Basically, your tapedev would look like 
  file:/path/to/backup/dir.
 
 works, of course ;)  i can amlabel a tape and dump to it.  after my
 amlabel command, i see the following in the data dir: 
   0-mercy00  0.mercy00  1-TAPEEND  1.TAPEEND
 
 from the docs it sounds like the data dir can contain multiple tapes,

No, where do you read that, the doc must be fixed.
With file:/path/to/backup/dir,
/path/to/backup/dir is a tape drive and 
/path/to/backup/dir/data is a tape.

You can only have one tape in a tape drive.

 that's the part i can't figgure out.  if i amlabel a new label, it
 just changes the label on the same image files.  i tried using
 chg-multi with slots set like:
   slot 0 /scratch/amanda/images/data/0.mercy00
   slot 1 /scratch/amanda/images/data/1-mercy01
   slot 2 /scratch/amanda/images/data
   slot 3 /scratch/amanda/images
 none of which work.  it never thinks it has a tape loaded...


You should use (4 tape drives):
  slot 0 file:/scratch/amanda/images0
  slot 1 file:/scratch/amanda/images1
  slot 2 file:/scratch/amanda/images2
  slot 3 file:/scratch/amanda/images3

Jean-Louis
-- 
Jean-Louis Martineau email: [EMAIL PROTECTED] 
Departement IRO, Universite de Montreal
C.P. 6128, Succ. CENTRE-VILLETel: (514) 343-6111 ext. 3529
Montreal, Canada, H3C 3J7Fax: (514) 343-5834



ftp to central tape library instead of local tape?

2002-02-27 Thread Jon Stearley

i've loved using amanda for 5 years to backup ~50 partitions from
various OSes (including netapps) to dat, dlt, and autoloaders, but
here's a new one:

i've changed jobs and now have access to a central tape-library, which
you just ftp stuff into and it takes care of all the taping
operations.  my role here is not one of sysadmin, but rather i'm just
looking for a way to backup my local desktop, using the central
tape-library rather than a local tape if possible.  so i thought,
maybe setup amanda on my workstation to backup my reiserfs partitions
(tar, with indexes) and then drop them into the central tape library
via ftp?

it may be stupid to try to use amanda to do this, but maybe it's as
easy as replacing amcheck with a script that checks ftp functionality
and returns an appropriate exit code, and replacing taper with a
script which ftps the images and returns appropriately.  amrestore
could navigate my indexes, and then i'd just grab/extract the data
manually.

just thought i'd pose this question here.  if it's a stupid idea just
say, as this isn't my only option.  i'm just so used to amanda that i
wonder if i can make it work in this manner without much difficulty.
any advice welcome.

please cc me as i'm not an active amanda-users reader right now.  thx!

-- 
+--+
| Jon Stearley  (505) 845-7571  (FAX 844-2067) |
| Compaq Federal LLCHigh Performance Solutions |
| Sandia National Laboratories  Scalable Systems Integration   |
+--+




Re: ftp to central tape library instead of local tape?

2002-02-27 Thread Joshua Baker-LePain

On Wed, 27 Feb 2002 at 9:33am, Jon Stearley wrote

 i've changed jobs and now have access to a central tape-library, which
 you just ftp stuff into and it takes care of all the taping
 operations.  my role here is not one of sysadmin, but rather i'm just

Uh oh, be careful.  If you show too much clue, you'll get drafted... ;)

 looking for a way to backup my local desktop, using the central
 tape-library rather than a local tape if possible.  so i thought,
 maybe setup amanda on my workstation to backup my reiserfs partitions
 (tar, with indexes) and then drop them into the central tape library
 via ftp?
 
 it may be stupid to try to use amanda to do this, but maybe it's as
 easy as replacing amcheck with a script that checks ftp functionality
 and returns an appropriate exit code, and replacing taper with a
 script which ftps the images and returns appropriately.  amrestore
 could navigate my indexes, and then i'd just grab/extract the data
 manually.

Well, 2.4.3b2 (derived from the 2.4.2-tapeio branch) has the ability to 
use files on disk like tapes.  You could back up to files on disk, and 
then have the cronjob which runs 'amdump' ftp those to the tape library.  
amrecover would still have access to your indexes, and when it asks you 
for a tape you just grab the right file off the ftp server/tape library.

The advantage to this is that you don't need to modify any code at all.  
But I'm interested -- let us know what you come up with.  And, FWIW, I 
don't think it's stupid at all.  Use what you know, and what you trust.

-- 
Joshua Baker-LePain
Department of Biomedical Engineering
Duke University