Here's the shell script I'm testing for the flip-flop disk backup. This
lets you take e.g. a 120GB disk and do full backups alternating between
two directories each night. No tapes. No holding directory. Pure disk.
Requires 2.4.3 and up. 

#!/bin/sh
# must have already created /backup/sfbk0 and /backup/sfbk1
# amanda knows only to back up to /backup/data
# point this to alternate directories on alternate days
# you always have yesterdays full backup, plus today a second full is
generated
d=`date "+%j"`       # get julian day number this year
dm=$(($d%2))         # mod 2 to alternate directories
rm /backup/data      # must remove or else ln puts link in subdir
cd /backup  
ln -s sfbk0$dm data  
/usr/local/sbin/amcheck $1
/usr/local/sbin/amdump $1

amanda.conf has no holding disk defined, and uses these definitions:
tapedev "file:/backup" 
tapetype DISKSAVE
labelstr "^sfbk[0-9][0-9]*$" 
define tapetype DISKSAVE  {
   comment "Fake tape description for save to disk"
   length 58 gbytes
   filemark 0 kbytes
   speed 2000 mbytes
}

There is some site-specific stuff in the above, which should be
customized, e.g. path name to amanda programs, backups in /backup,
labelstr, etc. Be sure to create and label the sfbk00 and sfbk01 ahead
of time; go into the directory and don't use full path names
when you label. (Unless you change your labelstr to want that).

What this is all supposed to do is, backup up to 58GB, with full backups
every night (using crontab), and flip-flop between the two directories
on odd/even days. Seems to work so far. The parameter to the script is
the name of the backup profile. The only glitch is you will lose a
backup on new years eve (except on leap years) when Julian day 365 rolls
to day 1.

Comments invited. It should also be possible to use a similar script to
create a series of full backups. It should also be possible to use the
autochanger facility and get some incremental backups into the mix as a
recent post described. But this is pretty simple and seems like what I
need for my small home network.

-Steve

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Steve Follmer
Sent: Thursday, June 20, 2002 12:43 PM
To: [EMAIL PROTECTED]
Subject: 2.4.3 Tapeless file-driver pure-disk backups



Firstly, I want to thank everyone who solved the problem Mohamed and I
were having. With 2.4.3 you can use tapedev "file:/backup" for
direct-to-disk backup (without resorting to older fake-out techniques of
loading up the holding disk). But remember that you must amlabel the
directory that /backup/data is or is linked to, as a nod to Amanda's
origins back in the days of tapes, punch cards, and paper tape.

I'm still a little confused though and feel amanda is still a bit mired
in a tape-based mindset. Like perhaps many amanda users, I'm new to
amanda, and simply have a small home LAN I want to back up. And with
Fry's selling 120GB drives for $109, and CD+-RW still confused,
disk-to-disk backup is an idea whose time has come. I am prepared to
believe that Amanda is wonderful (the Samba backup was a snap!), but it
seems a bit old fashioned compared to say, Second Copy 2000.

What happens is if I just have one file:/backup/data directory, it gets
erased and a full backup takes place every night. This might be
acceptable but I'm exposed for the time that the backup takes place. Why
doesn't amanda simply add incrementals to the one existing "tape"
(file)?

I probably must do what an earlier Bickle post described (more detail in
the egroup)... "To rotate 'tapes', i recommend creating sub-directories
and symbolically linking them to a 'data' subdirectory, which amlabel et
al will look for. The directories are labelled like tapes. I name the
subdirectories according to date, then i have a shell script which
creates a new directory every night, makes the symlink, labels the tape
then runs the backup.

I will try this, but won't I then end up with a long series of full
backups? (In other words, I'm guessing that Bickle sets the tapecycle to
1, and Amanda doesn't know to do any incrementals, since the several
"tapes" are created behind amanda's back). I can work with this but it
wastes disk space. Maybe my shell script can just alternate between 2
full images. I guess that is the best compromise. I will set the
tapecycle to 1, and not even define a holding disk. Amanda will think it
just has 1 tape and always do full backups. The script will flip-flop
the full backup from one directory to another and back again. For my
small home LAN this is acceptable since the network is quiet all night.
(Though still are incrementals too much to ask?)

When I get this working, I'll try to get both of these new techniques
(Bickle series, Follmer flip-flop) submitted to the FAQ. I wonder if
there is a way to use the Hogge posting on 2.4.2 autochangers to create
a third technique with autochangers for use with 2.4.3 tapeless
file-driver pure-disk backups. I also humbly suggest that the typical
amanda user and typical equipment cost has changed over the decades of
amanda, and that future versions could emphasize pure disk backup more. 

-Steve



Reply via email to