Amanda-Users

Autogenerated disklist files - long [Was Re: bug in disklist?]

2003-05-22 05:14:17
Subject: Autogenerated disklist files - long [Was Re: bug in disklist?]
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: amanda-users AT amanda DOT org
Date: Thu, 22 May 2003 11:10:06 +0200
Mats Blomstrand wrote:
Yada, yada....
You have fun, and i have got amanda working. Everyone is happy.

Yup, let's keep it that way!

And finally a little script to generate the disklist. It delete files
with '*', so a testrun in a empty directory is recommended. Provided
with the hope that it could be useful for someone else but me.

Thanks for the useful script.
It generates a disklist, and a some excludefiles.
Remember that the exclude files should be transferred to the client
(if your server and client are the same machine, or if you NFS-mount
some directory from the server on each client, than it works fine of course).


But a general remark on autogenerated diskfiles.

When you do an incremental backup, gnutar assumes that the previous
full or (level-1) backup was  done on the same base filesystem.
Let's assume, you level 0 backup was made from a directory like:
        /home/me
        /home/me/dir1
        /home/me/dir2
with this disklist file:
   my.srv  /home/me/dir1  user-tar 1
   my.srv  /home/me/dir2  user-tar 1
   my.srv  /home/me {
                exclude append "./dir1"
                exclude append "./dir2"
                } 1

Let's assume it was like this for some days, and amanda was doing
a level 1 for those DLE's.

The next day, you delete dir2, and the disklist file looks like:
   my.srv  /home/me/dir1
   my.srv  /home/me {
                exclude append "./dir1"
                } 1

A day later, you recreate dir2, fill it up manually with exactly
the same data (or something completely new, that doesn't matter).
Your generated disklist will contain dir2 again.
What level of backup will amanda use now?  Because amanda did not
yet reach the dumpcycle, it will probably be a level 1 again or a
level 2. But inside the directory every file is a new file.

And then you delete the directory again, this time by accident.

Mr. Sys Admin will restore it (but he didn't sleep well last night):
   cd /home/me
   su
   amrecover
   setdisk /home/me
   ls
 OOPS where is dir2?  Oh yeah, it was a separate DLE.
   exit
   mkdir dir2
   cd dir2
   amrecover
   setdisk /home/me/dir2
   "501 Disk my.srv:/home/me/dir2 is not in your disklist"
 What? oh yeah, it was deleted by automagically recreating the disklist
   exit
   ssh amandahost
   vi /etc/amanda/daily/disklist
     (adding /home/me/dir2 by hand)
   logout
   amrecover
   setdisk /home/me/dir2
   add .
   extract
   "The following tapes are needed: DAILY-03, DAILY-07"
 Dammit, restoring from daily-03 is completely useless, because
 the daily-07 will remove the complete contents again, replacing it
 with his contents.  And my slow drive takes about 1 hour to restore
 the first level 0.  This will take a some time!!!

Ok, you got the picture.

Some people once suggested to generate a disklist for only those
subdirectories that are larger then e.g. 1 GB.  This is very
dangerous!  This means that some days, /home/me/dir2 will be
a separate DLE, and other days, it will not.
So do you need to amrestore a separate DLE from tape, or is it
included in the main directory?
The index managed by Amanda does not automatically indicate this,
nor does the disklist file give you any hint about it.

Restoring /home/me from last month?  Was /home/me/dir2 at that
time a separate DLE or not?  How to find out?  Do you first
need to restore the disklist file from that date?

I like to manage my disklist by hand.
Whenever I add/delete/change something, I force a level 0 of
the concerned DLE's (e.g. the parent DLE /home/me, when I add
/home/me/dir2).
And I also like to make the changes as infrequent as possible.
Removing entries is done by commenting out and documenting
the date when it was done.
Now and then I do a general cleanup, but all comments not older
than my tapecycle (that means for my archive, I have entries from 1999
from dead hardware, tapecycle is infite there).

--
Paul Bijnens, Xplanation                            Tel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM    Fax  +32 16 397.512
http://www.xplanation.com/          email:  Paul.Bijnens AT xplanation DOT com
***********************************************************************
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit,  ZZ, :q, :q!,  M-Z, ^X^C,  logoff, logout, close, bye,  /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...    *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************



<Prev in Thread] Current Thread [Next in Thread>