Amanda-Users

Re: getting amanda to flush after moving holding disk items around?

2004-12-22 00:07:28
Subject: Re: getting amanda to flush after moving holding disk items around?
From: Palle Girgensohn <girgen AT pingpong DOT net>
To: Palle Girgensohn <girgen AT pingpong DOT net>, amanda-users AT amanda DOT org
Date: Wed, 22 Dec 2004 05:54:11 +0100
I found a way to fix this, so I thought I'd mention it here. Each holding disk chunk file of a multichunked dump has a registered pointer to the next file, "CONT_FILENAME". grep it and do something along these lines:

umask 0077
dirs=`grep '^ *directory' /usr/local/etc/amanda/normal/amanda.conf|cut -d\" -f2`
for i in $dirs; do
   for j in $i/*/* ; do
        [ -e $j ] || continue
        next=`head -n 2 $j|grep CONT_FILENAME | cut -f2 -d=`
        [ X$next == X ] && continue
        [ -e $next ] && continue
        base=`echo $next | sed -E 's,.*(2004.*),\1,'`
        loc=`find $dirs -type f -path \*$base`
         mkdir -p `dirname $next`
         ln -s $loc $next
   done
done

Regards,
Palle

--On tisdag, december 21, 2004 21.34.21 +0100 Palle Girgensohn <girgen AT pingpong DOT net> wrote:

Hi!

I had a problem with our taper, so for three weeks or so, I moved stuff
away from the holding disk to other disks with free space, so amanda
could continue to do its backups to holding disk.

Now I have a new taper, and I want to get the old dumpfiles back on tape.
But amanda refuses to flush some of them. Odd.

my conf name is normal:

To begin with, I could amflush repeatedly, amanda would all dumps, but
only accept some of them, the other would be ignored as cruft. next
amflush would accept some other files, some less would be ignored as
cruft. Now I've come to the point where none of the files found in the
holding disks are accepted. They are all found by amflush during its
interactive phase, but then ignored.

$ amadmin normal find

reveals the dumps on the holding disks. But amflush just ignores them:

---
amanda@banan:girgen$ amflush normal
Scanning /net/melon-internt/misc/dumps/dumps1...
  20041104: found Amanda directory.
  20041109: found Amanda directory.
  20041110: found Amanda directory.
  20041111: found Amanda directory.
  20041121: found Amanda directory.
Scanning /net/melon-internt/misc/dumps/dumps0...
  20041121: found Amanda directory.
Scanning /net/rambutan/opt/dumps/1...
  20041127: found Amanda directory.
  20041130: found Amanda directory.
  20041201: found Amanda directory.
  20041121: found Amanda directory.
Scanning /net/rambutan/opt/dumps/0...
  20041127: found Amanda directory.
  20041201: found Amanda directory.
Scanning /misc/dumps...
  20041126: found Amanda directory.
Scanning /dumps/1...
  20041110: found Amanda directory.
  20041113: found Amanda directory.
  20041116: found Amanda directory.
  20041117: found Amanda directory.
  20041118: found Amanda directory.
Scanning /dumps/0...
  20041121: found Amanda directory.
  20041113: found Amanda directory.
  20041116: found Amanda directory.
  20041117: found Amanda directory.
  20041118: found Amanda directory.
  20041119: found Amanda directory.

Multiple Amanda directories, please pick one by letter:
  A. 20041104
  B. 20041109
  C. 20041110
  D. 20041111
  E. 20041113
  F. 20041116
  G. 20041117
  H. 20041118
  I. 20041119
  J. 20041121
  K. 20041126
  L. 20041127
  M. 20041130
  N. 20041201
Select directories to flush [A..N]: [ALL]

Today is: 20041219
Flushing dumps in 20041104, 20041109, 20041110, 20041111, 20041113,
20041116, 20041117, 20041118, 20041119, 20041121, 20041126, 20041127,
20041130, 20041201 to tape drive "/dev/nrsa1".
Expecting tape daily100 or a new tape.  (The last dumps were to tape
daily308)
Are you sure you want to do this [yN]? y
Running in background, you can log off now.
You'll get mail when amflush is finished.

---

The above gives an amflush mail report where all lines are "NO FILE TO
FLUSH":

The dumps were flushed to tape daily309.
The next tape Amanda expects to use is: daily100.


STATISTICS:
                          Total       Full      Daily
                        --------   --------   --------
Estimate Time (hrs:min)    0:00
Run Time (hrs:min)         0:00
Dump Time (hrs:min)        0:00       0:00       0:00
Output Size (meg)           0.0        0.0        0.0
Original Size (meg)         0.0        0.0        0.0
Avg Compressed Size (%)     --         --         --
Filesystems Dumped            0          0          0
Avg Dump Rate (k/s)         --         --         --

Tape Time (hrs:min)        0:00       0:00       0:00
Tape Size (meg)             0.0        0.0        0.0
Tape Used (%)               0.0        0.0        0.0
Filesystems Taped             0          0          0
Avg Tp Write Rate (k/s)     --         --         --

USAGE BY TAPE:
  Label          Time      Size      %    Nb
  daily309       0:00       0.0    0.0     0


NOTES:
  taper: tape daily309 kb 0 fm 0 [OK]


DUMP SUMMARY:
                                     DUMPER STATS            TAPER STATS
HOSTNAME     DISK        L ORIG-KB OUT-KB COMP% MMM:SS  KB/s MMM:SS  KB/s
-------------------------- --------------------------------- ------------
banan.pingpo /             NO FILE TO FLUSH -----------------------------
... more hosts, all with NO FILE TO FLUSH


---

So, how can I get amflush to flush the stuff?

/Palle






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